Package org.jppf.node.connection
Class AbstractCsvConnectionStrategy
java.lang.Object
org.jppf.node.connection.AbstractCsvConnectionStrategy
- All Implemented Interfaces:
DriverConnectionStrategy
- Direct Known Subclasses:
JPPFCsvFileConnectionStrategy,JPPFCsvPropertyConnectionStrategy
public abstract class AbstractCsvConnectionStrategy
extends Object
implements DriverConnectionStrategy
Common abstact super class for connection strategies that read connection from groups of comma-separated values.
- Since:
- 6.0
- Author:
- Laurent Cohen
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.jppf.utils.TypedPropertiesThe node configuration. -
Constructor Summary
ConstructorsConstructorDescriptionFind and read the CSV data.AbstractCsvConnectionStrategy(org.jppf.utils.TypedProperties config) Find and read the CSV data. -
Method Summary
Modifier and TypeMethodDescriptionnextConnectionInfo(DriverConnectionInfo currentInfo, ConnectionContext context) Get a new connection information, eventually based on the one that was previously used.
-
Field Details
-
config
protected final org.jppf.utils.TypedProperties configThe node configuration.
-
-
Constructor Details
-
AbstractCsvConnectionStrategy
public AbstractCsvConnectionStrategy()Find and read the CSV data. -
AbstractCsvConnectionStrategy
public AbstractCsvConnectionStrategy(org.jppf.utils.TypedProperties config) Find and read the CSV data.- 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.
-