Class EPPQuicSessionPoolableFactory

java.lang.Object
com.verisign.epp.pool.EPPSessionPoolableFactory
com.verisign.epp.pool.EPPQuicSessionPoolableFactory
All Implemented Interfaces:
org.apache.commons.pool2.PooledObjectFactory<EPPPooledSession>

public class EPPQuicSessionPoolableFactory extends EPPSessionPoolableFactory implements org.apache.commons.pool2.PooledObjectFactory<EPPPooledSession>
Customized EPPSessionPoolableFactory for creating a pool of EPPQuicSession objects.
  • Constructor Details

    • EPPQuicSessionPoolableFactory

      public EPPQuicSessionPoolableFactory()
      Default constructor.
    • EPPQuicSessionPoolableFactory

      public EPPQuicSessionPoolableFactory(String aClientId, String aPassword, long aAbsoluteTimeout, long aIdleTimeout)
      Create an EPP session poolable factory with the client id, password used to authenticate the session. The kind of EPP session created default to KIND_GENERIC.
      Parameters:
      aClientId - Login id used to authenticate
      aPassword - Password used to authenticate
      aAbsoluteTimeout - Session absolute timeout
      aIdleTimeout - Session idle timeout
    • EPPQuicSessionPoolableFactory

      public EPPQuicSessionPoolableFactory(String aClientId, String aPassword, long aMinAbsoluteTimeout, long aMaxAbsoluteTimeout, long aIdleTimeout, String aServerName)
      Create an EPP session poolable factory with the client id, password, and target URL for an Quic connection. The session kind is automatically set to KIND_Quic.
      Parameters:
      aClientId - Login id used to authenticate
      aPassword - Password used to authenticate
      aMinAbsoluteTimeout - Session minimum absolute timeout
      aMaxAbsoluteTimeout - Session maximum absolute timeout
      aIdleTimeout - Session idle timeout
      aServerName - Server URL name (e.g., Quics://epp.example.com)
  • Method Details

    • activateObject

      public void activateObject(org.apache.commons.pool2.PooledObject<EPPPooledSession> aSession) throws Exception
      Session being borrowed from the pool.
      Specified by:
      activateObject in interface org.apache.commons.pool2.PooledObjectFactory<EPPPooledSession>
      Parameters:
      aSession - Session being returned
      Throws:
      Exception
    • destroyObject

      public void destroyObject(org.apache.commons.pool2.PooledObject<EPPPooledSession> aSession) throws Exception
      Destroy object from the pool.
      Specified by:
      destroyObject in interface org.apache.commons.pool2.PooledObjectFactory<EPPPooledSession>
      Parameters:
      aSession - Session being destroyed
      Throws:
      Exception
    • makeObject

      public org.apache.commons.pool2.PooledObject<EPPPooledSession> makeObject() throws Exception
      Creates a new session object.
      Specified by:
      makeObject in interface org.apache.commons.pool2.PooledObjectFactory<EPPPooledSession>
      Throws:
      Exception
    • passivateObject

      public void passivateObject(org.apache.commons.pool2.PooledObject<EPPPooledSession> aSession) throws Exception
      Session is being returned to the pool.
      Specified by:
      passivateObject in interface org.apache.commons.pool2.PooledObjectFactory<EPPPooledSession>
      Parameters:
      aSession - Session being returned
      Throws:
      Exception
    • validateObject

      public boolean validateObject(org.apache.commons.pool2.PooledObject<EPPPooledSession> aSession)
      Validates a session by sending a keep alive. If an exception occurs from the keep alive, than the session is not valid.
      Specified by:
      validateObject in interface org.apache.commons.pool2.PooledObjectFactory<EPPPooledSession>
      Parameters:
      aSession - Session to validate
      Returns:
      true if the session is valid; false otherwise.
    • makeSession

      protected EPPPooledSession makeSession() throws Exception
      Make an Quic EPP session instance for pool.
      Returns:
      EPPQuicSession instance
      Throws:
      Exception - if something goes wrong