Package com.verisign.epp.pool

## Class EPPSessionPoolableFactory

- java.lang.Object
- - com.verisign.epp.pool.EPPSessionPoolableFactory

- All Implemented Interfaces:
    `org.apache.commons.pool2.PooledObjectFactory<EPPPooledSession>`
  Direct Known Subclasses:
    `EPPGenericSessionPoolableFactory`, `EPPHttpSessionPoolableFactory`, `EPPQuicSessionPoolableFactory`

      public abstract class EPPSessionPoolableFactory
      extends java.lang.Object
      implements org.apache.commons.pool2.PooledObjectFactory<EPPPooledSession>

  Base class for the session pool factories that can be configured. The concrete session pool factories will implement the concrete Commons Pool PoolableObjectFactory generics class.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected long` | `absoluteTimeout` | Session absolute timeout in milliseconds for all sessions.
    `protected java.lang.String` | `clientHost` | Name or IP address to connect from.
    `protected java.lang.String` | `clientId` | Client id used during session authentication.
    `protected EPPClientTransIdGenerator` | `clientTransIdGenerator` | Client transaction identifier generator used with login and logout commands.
    `protected long` | `idleTimeout` | Idle timeout in milliseconds
    `protected boolean` | `initSessionOnMake` | Initialize the session with the call to `PooledObjectFactory.makeObject()` with a default value of `true`.
    `protected long` | `maxAbsoluteTimeout` | Maximum absolute timeout in milliseconds.
    `protected long` | `minAbsoluteTimeout` | Minimum absolute timeout in milliseconds.
    `protected java.lang.String` | `password` | Password used during session authentication.
    `protected java.lang.String` | `serverName` | Name or IP address of TCP server or URL of HTTP server.
    `protected java.lang.Integer` | `serverPort` | Port number of TCP server.
    `protected EPPSSLContext` | `sslContext` | SSL context information
    `static long` | `TIMEOUT_UNSET` | The timeout value is not set.

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `EPPSessionPoolableFactory()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `long` | `getAbsoluteTimeout()` | Gets the session absolute timeout in milliseconds.
    `java.lang.String` | `getClientHost()` | Gets the TCP server IP address or host name to connect from.
    `java.lang.String` | `getClientId()` |
    `EPPClientTransIdGenerator` | `getClientTransIdGenerator()` | Gets the client transaction identifier generator object that is set.
    `long` | `getIdleTimeout()` | Gets the session idle timeout.
    `long` | `getMaxAbsoluteTimeout()` | Gets the maximum session absolute timeout in milliseconds.
    `long` | `getMinAbsoluteTimeout()` | Gets the minimum session absolute timeout in milliseconds.
    `java.lang.String` | `getPassword()` |
    `java.lang.String` | `getServerName()` | Gets the TCP server IP address or host name, or the URL of the HTTP server.
    `java.lang.Integer` | `getServerPort()` | Gets the TCP server port number.
    `EPPSSLContext` | `getSSLContext()` | Gets the optional `EPPSSLContext` associated with the factory.
    `boolean` | `isInitSessionOnMake()` | Initialize the session via an EPP login on the call to `PooledObjectFactory.makeObject()`? The default value is `true`.
    `boolean` | `isRandomAbsoluteTimeout()` | Returns whether the absolute timeout will be randomized between the `minAbsoluteTimeout` and `maxAbsoluteTimemout`.
    `void` | `setAbsoluteTimeout​(long aAbsoluteTimeout)` | Sets the session absolute timeout in milliseconds.
    `void` | `setClientHost​(java.lang.String aClientHost)` | Sets the TCP server IP address or host name to connect from.
    `void` | `setClientId​(java.lang.String clientId)` |
    `void` | `setClientTransIdGenerator​(EPPClientTransIdGenerator aClientTransIdGenerator)` | Sets the client transaction identifier generator object that is used to generate client transaction identifiers for the login and logout commands.
    `void` | `setIdleTimeout​(long aIdleTimeout)` | Sets the session idle timeout.
    `void` | `setInitSessionOnMake​(boolean aInitSessionOnMake)` | Set whether to initialize the session via an EPP login on the call to `PooledObjectFactory.makeObject()`.
    `void` | `setMaxAbsoluteTimeout​(long aMaxAbsoluteTimeout)` | Sets the maximum session absolute timeout.
    `void` | `setMinAbsoluteTimeout​(long aMinAbsoluteTimeout)` | Sets the minimum session absolute timeout.
    `void` | `setPassword​(java.lang.String password)` |
    `void` | `setServerName​(java.lang.String aServerName)` | Sets the TCP server IP address or host name or the URL of the HTTP server.
    `void` | `setServerPort​(java.lang.Integer aServerPort)` | Sets the TCP server port number.
    `void` | `setSSLContext​(EPPSSLContext aSSLContext)` | Gets the optional `EPPSSLContext` associated with the factory.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.apache.commons.pool2.PooledObjectFactory

      `activateObject, destroyObject, destroyObject, makeObject, passivateObject, validateObject`

- - ### Field Detail

    - #### TIMEOUT_UNSET

          public static long TIMEOUT_UNSET

      The timeout value is not set.

    - #### clientId

          protected java.lang.String clientId

      Client id used during session authentication.

    - #### password

          protected java.lang.String password

      Password used during session authentication.

    - #### absoluteTimeout

          protected long absoluteTimeout

      Session absolute timeout in milliseconds for all sessions. If both `minAbsoluteTimeout` and `maxAbsoluteTimemout` are set, they will override the setting of the `absoluteTimeout`.

    - #### minAbsoluteTimeout

          protected long minAbsoluteTimeout

      Minimum absolute timeout in milliseconds. The actual absolute timeout will be randomized between the `minAbsoluteTimeout` and `maxAbsoluteTimeout`. If both `minAbsoluteTimeout` and `maxAbsoluteTimemout` are set, they will override the setting of the `absoluteTimeout`.

    - #### maxAbsoluteTimeout

          protected long maxAbsoluteTimeout

      Maximum absolute timeout in milliseconds. The actual absolute timeout will be randomized between the `minAbsoluteTimeout` and `maxAbsoluteTimeout`. If both `minAbsoluteTimeout` and `maxAbsoluteTimemout` are set, they will override the setting of the `absoluteTimeout`.

    - #### idleTimeout

          protected long idleTimeout

      Idle timeout in milliseconds

    - #### serverName

          protected java.lang.String serverName

      Name or IP address of TCP server or URL of HTTP server.

    - #### serverPort

          protected java.lang.Integer serverPort

      Port number of TCP server. This attribute should be `null` when connecting to a HTTP server.

    - #### clientHost

          protected java.lang.String clientHost

      Name or IP address to connect from. When `null` the host will be set to the loop back.

    - #### sslContext

          protected EPPSSLContext sslContext

      SSL context information

    - #### clientTransIdGenerator

          protected EPPClientTransIdGenerator clientTransIdGenerator

      Client transaction identifier generator used with login and logout commands.

    - #### initSessionOnMake

          protected boolean initSessionOnMake

      Initialize the session with the call to `PooledObjectFactory.makeObject()` with a default value of `true`. This attribute also impacts the automatic call to end the session with the call to `PooledObjectFactory.destroyObject(PooledObject)`.

  - ### Constructor Detail

    - #### EPPSessionPoolableFactory

          public EPPSessionPoolableFactory()

  - ### Method Detail

    - #### getClientId

          public java.lang.String getClientId()

      Returns:
        Returns the clientId.

    - #### setClientId

          public void setClientId​(java.lang.String clientId)

      Parameters:
        `clientId` - The clientId to set.

    - #### getPassword

          public java.lang.String getPassword()

      Returns:
        Returns the password.

    - #### setPassword

          public void setPassword​(java.lang.String password)

      Parameters:
        `password` - The password to set.

    - #### getAbsoluteTimeout

          public long getAbsoluteTimeout()

      Gets the session absolute timeout in milliseconds.
      Returns:
        Absolute timeout in milliseconds

    - #### setAbsoluteTimeout

          public void setAbsoluteTimeout​(long aAbsoluteTimeout)

      Sets the session absolute timeout in milliseconds.
      Parameters:
        `aAbsoluteTimeout` - Absolute timeout in milliseconds.

    - #### getMinAbsoluteTimeout

          public long getMinAbsoluteTimeout()

      Gets the minimum session absolute timeout in milliseconds. If both `minAbsoluteTimeout` and `maxAbsoluteTimemout` are set, they will override the setting of `absoluteTimeout`.
      Returns:
        Minimum absolute timeout in milliseconds

    - #### setMinAbsoluteTimeout

          public void setMinAbsoluteTimeout​(long aMinAbsoluteTimeout)

      Sets the minimum session absolute timeout. If both `minAbsoluteTimeout` and `maxAbsoluteTimemout` are set, they will override the setting of the `absoluteTimeout`.
      Parameters:
        `aMinAbsoluteTimeout` - Minimum absolute timeout in milliseconds.

    - #### getMaxAbsoluteTimeout

          public long getMaxAbsoluteTimeout()

      Gets the maximum session absolute timeout in milliseconds. If both `minAbsoluteTimeout` and `maxAbsoluteTimemout` are set, they will override the setting of `absoluteTimeout`.
      Returns:
        Maximum absolute timeout in milliseconds

    - #### setMaxAbsoluteTimeout

          public void setMaxAbsoluteTimeout​(long aMaxAbsoluteTimeout)

      Sets the maximum session absolute timeout. If both `minAbsoluteTimeout` and `maxAbsoluteTimemout` are set, they will override the setting of the `absoluteTimeout`.
      Parameters:
        `aMaxAbsoluteTimeout` - Maximum absolute timeout in milliseconds.

    - #### isRandomAbsoluteTimeout

          public boolean isRandomAbsoluteTimeout()

      Returns whether the absolute timeout will be randomized between the `minAbsoluteTimeout` and `maxAbsoluteTimemout`.
      Returns:
        `true` if the absolute timeout will be randomized; `false` otherwise.

    - #### getIdleTimeout

          public long getIdleTimeout()

      Gets the session idle timeout.
      Returns:
        The idle timeout in milliseconds

    - #### setIdleTimeout

          public void setIdleTimeout​(long aIdleTimeout)

      Sets the session idle timeout.
      Parameters:
        `aIdleTimeout` - Idle session in milliseconds

    - #### getServerName

          public java.lang.String getServerName()

      Gets the TCP server IP address or host name, or the URL of the HTTP server.
      Returns:
        Server host name, IP address, or URL

    - #### setServerName

          public void setServerName​(java.lang.String aServerName)

      Sets the TCP server IP address or host name or the URL of the HTTP server.
      Parameters:
        `aServerName` - Server host name, IP address, or URL

    - #### getServerPort

          public java.lang.Integer getServerPort()

      Gets the TCP server port number. This will be `null` if connecting to a HTTP server.
      Returns:
        TCP server port number if defined; `null` otherwise.

    - #### setServerPort

          public void setServerPort​(java.lang.Integer aServerPort)

      Sets the TCP server port number.
      Parameters:
        `aServerPort` - TCP server port number

    - #### getClientHost

          public java.lang.String getClientHost()

      Gets the TCP server IP address or host name to connect from. A `null` value will use the loop back.
      Returns:
        Client host name or IP address if defined;`null` otherwise.

    - #### setClientHost

          public void setClientHost​(java.lang.String aClientHost)

      Sets the TCP server IP address or host name to connect from. A `null` value will use the loop back.
      Parameters:
        `aClientHost` - Client host name or IP address

    - #### getSSLContext

          public EPPSSLContext getSSLContext()

      Gets the optional `EPPSSLContext` associated with the factory.
      Returns:
        SSL Context if defined; `null` otherwise

    - #### setSSLContext

          public void setSSLContext​(EPPSSLContext aSSLContext)

      Gets the optional `EPPSSLContext` associated with the factory.
      Parameters:
        `aSSLContext` - SSL Context to use by the factory

    - #### getClientTransIdGenerator

          public EPPClientTransIdGenerator getClientTransIdGenerator()

      Gets the client transaction identifier generator object that is set.
      Returns:
        Client transaction identifier generator object if set; `null` otherwise.

    - #### setClientTransIdGenerator

          public void setClientTransIdGenerator​(EPPClientTransIdGenerator aClientTransIdGenerator)

      Sets the client transaction identifier generator object that is used to generate client transaction identifiers for the login and logout commands.
      Parameters:
        `aClientTransIdGenerator` - Client transaction identifier generator object or `null` to unset the generator

    - #### isInitSessionOnMake

          public boolean isInitSessionOnMake()

      Initialize the session via an EPP login on the call to `PooledObjectFactory.makeObject()`? The default value is `true`. This also impacts executing end session via the EPP logout on the call to `PooledObjectFactory.destroyObject(PooledObject)`.
      Returns:
        `true` the session will be initialized via an EPP login on the call to `PooledObjectFactory.makeObject()`; `false` otherwise

    - #### setInitSessionOnMake

          public void setInitSessionOnMake​(boolean aInitSessionOnMake)

      Set whether to initialize the session via an EPP login on the call to `PooledObjectFactory.makeObject()`. The default value is `true`. This also impacts executing end session via the EPP logout on the call to `PooledObjectFactory.destroyObject(PooledObject)`.
      Parameters:
        `aInitSessionOnMake` - `true` the session will be initialized via an EPP login on the call to `PooledObjectFactory.makeObject()`; `false` otherwise