Class URLSelector
- java.lang.Object
-
- org.jboss.jca.adapters.jdbc.local.URLSelector
-
- All Implemented Interfaces:
URLSelectorStrategy
public class URLSelector extends Object implements URLSelectorStrategy
Default URL selector implementation- Author:
- Jesper Pedersen
-
-
Constructor Summary
Constructors Constructor Description URLSelector()Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringactive()Get the active URLvoidfail(String url)Fail an URL - e.g.StringgetData()Get the data for an error presentationbooleanhasMore()Does the plugin has more valid URLs ?voidinit(List<String> urls)Init the plugin with the URLsvoidreset()Reset the pluginvoidsuccess(String url)URL was accepted - potentially mark it as activeStringtoString()
-
-
-
Method Detail
-
init
public void init(List<String> urls)
Init the plugin with the URLs- Specified by:
initin interfaceURLSelectorStrategy- Parameters:
urls- The URLs
-
hasMore
public boolean hasMore()
Does the plugin has more valid URLs ?- Specified by:
hasMorein interfaceURLSelectorStrategy- Returns:
- True, if more are available, otherwise false
-
active
public String active()
Get the active URL- Specified by:
activein interfaceURLSelectorStrategy- Returns:
- The value
-
fail
public void fail(String url)
Fail an URL - e.g. mark it as bad- Specified by:
failin interfaceURLSelectorStrategy- Parameters:
url- The URL
-
success
public void success(String url)
URL was accepted - potentially mark it as active- Specified by:
successin interfaceURLSelectorStrategy
-
reset
public void reset()
Reset the plugin- Specified by:
resetin interfaceURLSelectorStrategy
-
getData
public String getData()
Get the data for an error presentation- Specified by:
getDatain interfaceURLSelectorStrategy- Returns:
- The value
-
-