Class EPPPooledGenericHttpSession

All Implemented Interfaces:
EPPPooledSession

public class EPPPooledGenericHttpSession extends EPPHttpSession implements EPPPooledSession
Pooled generic EPPHttpSession. Timestamp attributes were added to handle absolute session timeout and ensure that idle timeouts don't occur.
  • Constructor Details

    • EPPPooledGenericHttpSession

      public EPPPooledGenericHttpSession() throws EPPCommandException
      Default constructor for EPPPooledGenericSession.
      Throws:
      EPPCommandException - On error
    • EPPPooledGenericHttpSession

      public EPPPooledGenericHttpSession(String aUrl) throws EPPCommandException
      Constructor that takes an explicit URL to connect to.
      Parameters:
      aUrl - URL to connect to
      Throws:
      EPPCommandException - Error connecting to server
    • EPPPooledGenericHttpSession

      public EPPPooledGenericHttpSession(String aUrl, EPPSSLContext aSSLContext) throws EPPCommandException
      Constructor that takes an explicit URL to connect to and EPPSSLContext to use.
      Parameters:
      aUrl - URL to connect to
      aSSLContext - Optional specific SSL context to use. Set to null if undefined.
      Throws:
      EPPCommandException - Error connecting to server
  • Method Details

    • getCreatedTime

      public long getCreatedTime()
      Gets the time the pooled object was created.
      Specified by:
      getCreatedTime in interface EPPPooledSession
      Returns:
      Epoch time of creation
    • getLastTouched

      public long getLastTouched()
      Gets the last time the pooled object was touched.
      Specified by:
      getLastTouched in interface EPPPooledSession
      Returns:
      Epoch time of touch
    • touch

      public void touch()
      Sets the last touched to the current time.
      Specified by:
      touch in interface EPPPooledSession
    • hasAbsoluteTimeout

      public boolean hasAbsoluteTimeout()
      Has absolute timeout set?
      Returns:
      true if absolute timeout are set; false otherwise.
    • getAbsoluteTimeout

      public long getAbsoluteTimeout()
      Gets the session absolute timeout in milliseconds.
      Specified by:
      getAbsoluteTimeout in interface EPPPooledSession
      Returns:
      Absolute timeout in milliseconds
    • setAbsoluteTimeout

      public void setAbsoluteTimeout(long aAbsoluteTimeout)
      Sets the session absolute timeout in milliseconds.
      Parameters:
      aAbsoluteTimeout - Absolute timeout in milliseconds.