org.jboss.jca.adapters.jdbc.local
Class URLSelector

java.lang.Object
  extended by 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
URLSelector()
          Constructor
 
Method Summary
 String active()
          Get the active URL
 void fail(String url)
          Fail an URL - e.g.
 String getData()
          Get the data for an error presentation
 boolean hasMore()
          Does the plugin has more valid URLs ?
 void init(List<String> urls)
          Init the plugin with the URLs
 void reset()
          Reset the plugin
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

URLSelector

public URLSelector()
Constructor

Method Detail

init

public void init(List<String> urls)
Init the plugin with the URLs

Specified by:
init in interface URLSelectorStrategy
Parameters:
urls - The URLs

hasMore

public boolean hasMore()
Does the plugin has more valid URLs ?

Specified by:
hasMore in interface URLSelectorStrategy
Returns:
True, if more are available, otherwise false

active

public String active()
Get the active URL

Specified by:
active in interface URLSelectorStrategy
Returns:
The value

fail

public void fail(String url)
Fail an URL - e.g. mark it as bad

Specified by:
fail in interface URLSelectorStrategy
Parameters:
url - The URL

reset

public void reset()
Reset the plugin

Specified by:
reset in interface URLSelectorStrategy

getData

public String getData()
Get the data for an error presentation

Specified by:
getData in interface URLSelectorStrategy
Returns:
The value

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2012 JBoss, by Red Hat (http://www.jboss.org/ironjacamar)