Interface DriverConnectionStrategy

All Known Implementing Classes:
AbstractCsvConnectionStrategy, JPPFCsvFileConnectionStrategy, JPPFCsvPropertyConnectionStrategy, JPPFDefaultConnectionStrategy

public interface DriverConnectionStrategy
This interface defines which parameters should be used to connect to the driver.

It gives the ability to create new sets of parameters whenever a connection attempt was unsuccessful, therefore providing the nodes with a failover strategy when the connection to a driver cannot be established.

Since:
4.1
Author:
Laurent Cohen
  • Method Details

    • nextConnectionInfo

      DriverConnectionInfo nextConnectionInfo(DriverConnectionInfo currentInfo, ConnectionContext context)
      Get a new connection information, eventually based on the one that was previously used.
      Parameters:
      currentInfo - the DriverConnectionInfo that was previously used to connecto the driver, or null if 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 DriverConnectionInfo object that the node will use to connect to the driver.