Package org.jppf.node.connection
Class JPPFDefaultConnectionStrategy
java.lang.Object
org.jppf.node.connection.JPPFDefaultConnectionStrategy
- All Implemented Interfaces:
DriverConnectionStrategy
This implementation of
DriverConnectionStrategy is the JPPF default
and produces DriverConnectionInfo instances based solely on the JPPF configuration.- Since:
- 4.1
- Author:
- Laurent Cohen
-
Constructor Summary
ConstructorsConstructorDescriptionCreate this connection strategy.JPPFDefaultConnectionStrategy(org.jppf.utils.TypedProperties config) Create this connection strategy. -
Method Summary
Modifier and TypeMethodDescriptionnextConnectionInfo(DriverConnectionInfo currentInfo, ConnectionContext context) Get a new connection information, eventually based on the one that was previously used.
-
Constructor Details
-
JPPFDefaultConnectionStrategy
public JPPFDefaultConnectionStrategy()Create this connection strategy. -
JPPFDefaultConnectionStrategy
public JPPFDefaultConnectionStrategy(org.jppf.utils.TypedProperties config) Create this connection strategy.- Parameters:
config- the node configuration.
-
-
Method Details
-
nextConnectionInfo
public DriverConnectionInfo nextConnectionInfo(DriverConnectionInfo currentInfo, ConnectionContext context) Description copied from interface:DriverConnectionStrategyGet a new connection information, eventually based on the one that was previously used.- Specified by:
nextConnectionInfoin interfaceDriverConnectionStrategy- Parameters:
currentInfo- theDriverConnectionInfothat was previously used to connecto the driver, ornullif the node is connecting for the first time.context- provides information on why a new connection is requested, so as to help deciding which connection information to provide.- Returns:
- a new
DriverConnectionInfoobject that the node will use to connect to the driver.
-