Class DriverConnectionInfo

java.lang.Object
org.jppf.discovery.DriverConnectionInfo
Direct Known Subclasses:
ClientConnectionPoolInfo

public class DriverConnectionInfo extends Object
Superclass for connection info in custom driver discovery mechanisms.
Since:
5.2.1
Author:
Laurent Cohen
  • Constructor Details

    • DriverConnectionInfo

      public DriverConnectionInfo()
      Initialize a plain connection with default name("driver"), pool size (1), host ("localhost") and port (11111).
    • DriverConnectionInfo

      public DriverConnectionInfo(String name, String host, int port)
      Initialize a plain connection with a default pool size of 1.
      Parameters:
      name - the name given to this connection.
      host - the driver host name or IP address.
      port - the driver port to connect to.
    • DriverConnectionInfo

      public DriverConnectionInfo(String name, boolean secure, String host, int port)
      Initialize a connection with a default pool size of 1.
      Parameters:
      name - the name given to this connection.
      secure - whether SSL/TLS should be used.
      host - the driver host name or IP address.
      port - the driver port to connect to.
    • DriverConnectionInfo

      public DriverConnectionInfo(String name, boolean secure, String host, int port, int poolSize)
      Initialize a connection.
      Parameters:
      name - the name given to this connection.
      secure - whether SSL/TLS should be used.
      host - the driver host name or IP address.
      port - the driver port to connect to.
      poolSize - the number of driver connections in the pool.
    • DriverConnectionInfo

      public DriverConnectionInfo(String name, boolean secure, String host, int port, int poolSize, boolean heartbeatEnabled)
      Initialize a connection.
      Parameters:
      name - the name given to this connection.
      secure - whether SSL/TLS should be used.
      host - the driver host name or IP address.
      port - the driver port to connect to.
      poolSize - the number of driver connections in the pool.
      heartbeatEnabled - whether the heartbeat mechanism is enabled for the connection pool.
  • Method Details

    • getName

      public String getName()
      Get the name given to this connection.
      Returns:
      the connection name as a string.
    • setName

      public void setName(String name)
      Set the name of this connection.
      Parameters:
      name - the connection name as a string.
    • isSecure

      public boolean isSecure()
      Determine whether secure (with SSL/TLS) connections should be established.
      Returns:
      true for secure connections, false otherwise.
    • setSecure

      public void setSecure(boolean secure)
      Set whether secure (with SSL/TLS) connections should be established.
      Parameters:
      secure - true for secure connections, false otherwise.
    • getHost

      public String getHost()
      Get the driver host name or IP address.
      Returns:
      the host as a string.
    • setHost

      public void setHost(String host)
      Set the driver host name or IP address.
      Parameters:
      host - the host as a string.
    • getPort

      public int getPort()
      Get the driver port to connect to.
      Returns:
      the driver port as an int value.
    • setPort

      public void setPort(int port)
      Set the driver port to connect to.
      Parameters:
      port - the driver port as an int value.
    • getPoolSize

      public int getPoolSize()
      Get the connection pool size.
      Returns:
      the connection pool size as an int value.
    • setPoolSize

      public void setPoolSize(int poolSize)
      Set the connection pool size.
      Parameters:
      poolSize - the connection pool size as an int value.
    • isHeartbeatEnabled

      public boolean isHeartbeatEnabled()
      Determine whether the heartbeat mechanism is enabled for the connection pool.
      Returns:
      true if heartbeat is enabled, false otherwise.
    • setHeartbeatEnabled

      public void setHeartbeatEnabled(boolean heartbeatEnabled)
      Set whether the heartbeat mechanism is enabled for the connection pool.
      Parameters:
      heartbeatEnabled - true if heartbeat is enabled, false otherwise.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object