org.objectweb.cjdbc.driver.connectpolicy
Class SingleConnectPolicy

java.lang.Object
  extended byorg.objectweb.cjdbc.driver.connectpolicy.AbstractControllerConnectPolicy
      extended byorg.objectweb.cjdbc.driver.connectpolicy.SingleConnectPolicy

public class SingleConnectPolicy
extends AbstractControllerConnectPolicy

This class defines a SingleConnectPolicy used when a C-JDBC URL only contains one controller.

Version:
1.0
Author:
Emmanuel Cecchet

Field Summary
 
Fields inherited from class org.objectweb.cjdbc.driver.connectpolicy.AbstractControllerConnectPolicy
controllerList, debugLevel, suspectedControllers
 
Constructor Summary
SingleConnectPolicy(ControllerInfo[] controllerList, int debugLevel)
          Creates a new SingleConnectPolicy object
 
Method Summary
 ControllerInfo getController()
          Get a controller using the implementation specific policy
 
Methods inherited from class org.objectweb.cjdbc.driver.connectpolicy.AbstractControllerConnectPolicy
finalize, getControllerList, getSuspectedControllers, isSuspectedOfFailure, removeControllerFromSuspectList, setControllerList, suspectControllerOfFailure
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingleConnectPolicy

public SingleConnectPolicy(ControllerInfo[] controllerList,
                           int debugLevel)
Creates a new SingleConnectPolicy object

Parameters:
controllerList - list of controller from C-JDBC url
debugLevel - the debug level to use
See Also:
CjdbcUrl.DEBUG_LEVEL_OFF
Method Detail

getController

public ControllerInfo getController()
                             throws NoMoreControllerException
Description copied from class: AbstractControllerConnectPolicy
Get a controller using the implementation specific policy

Specified by:
getController in class AbstractControllerConnectPolicy
Returns:
ControllerInfo of the selected controller
Throws:
NoMoreControllerException - if no controller in the controller list is reachable
See Also:
AbstractControllerConnectPolicy.getController()


Copyright © 2002, 2005 - ObjectWeb Consortium - All Rights Reserved.