Package com.verisign.epp.pool
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.-
Field Summary
Fields inherited from class com.verisign.epp.pool.EPPSessionPoolableFactory
absoluteTimeout, clientHost, clientId, clientTransIdGenerator, idleTimeout, initSessionOnMake, maxAbsoluteTimeout, minAbsoluteTimeout, password, serverName, serverPort, sslContext, TIMEOUT_UNSET -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.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.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. -
Method Summary
Modifier and TypeMethodDescriptionvoidactivateObject(org.apache.commons.pool2.PooledObject<EPPPooledSession> aSession) Session being borrowed from the pool.voiddestroyObject(org.apache.commons.pool2.PooledObject<EPPPooledSession> aSession) Destroy object from the pool.org.apache.commons.pool2.PooledObject<EPPPooledSession> Creates a new session object.protected EPPPooledSessionMake an Quic EPP session instance for pool.voidpassivateObject(org.apache.commons.pool2.PooledObject<EPPPooledSession> aSession) Session is being returned to the pool.booleanvalidateObject(org.apache.commons.pool2.PooledObject<EPPPooledSession> aSession) Validates a session by sending a keep alive.Methods inherited from class com.verisign.epp.pool.EPPSessionPoolableFactory
getAbsoluteTimeout, getClientHost, getClientId, getClientTransIdGenerator, getIdleTimeout, getMaxAbsoluteTimeout, getMinAbsoluteTimeout, getPassword, getServerName, getServerPort, getSSLContext, isInitSessionOnMake, isRandomAbsoluteTimeout, setAbsoluteTimeout, setClientHost, setClientId, setClientTransIdGenerator, setIdleTimeout, setInitSessionOnMake, setMaxAbsoluteTimeout, setMinAbsoluteTimeout, setPassword, setServerName, setServerPort, setSSLContextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.commons.pool2.PooledObjectFactory
destroyObject
-
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 toKIND_GENERIC.- Parameters:
aClientId- Login id used to authenticateaPassword- Password used to authenticateaAbsoluteTimeout- Session absolute timeoutaIdleTimeout- 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 toKIND_Quic.- Parameters:
aClientId- Login id used to authenticateaPassword- Password used to authenticateaMinAbsoluteTimeout- Session minimum absolute timeoutaMaxAbsoluteTimeout- Session maximum absolute timeoutaIdleTimeout- Session idle timeoutaServerName- 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:
activateObjectin interfaceorg.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:
destroyObjectin interfaceorg.apache.commons.pool2.PooledObjectFactory<EPPPooledSession>- Parameters:
aSession- Session being destroyed- Throws:
Exception
-
makeObject
Creates a new session object.- Specified by:
makeObjectin interfaceorg.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:
passivateObjectin interfaceorg.apache.commons.pool2.PooledObjectFactory<EPPPooledSession>- Parameters:
aSession- Session being returned- Throws:
Exception
-
validateObject
Validates a session by sending a keep alive. If an exception occurs from the keep alive, than the session is not valid.- Specified by:
validateObjectin interfaceorg.apache.commons.pool2.PooledObjectFactory<EPPPooledSession>- Parameters:
aSession- Session to validate- Returns:
trueif the session is valid;falseotherwise.
-
makeSession
Make an Quic EPP session instance for pool.- Returns:
EPPQuicSessioninstance- Throws:
Exception- if something goes wrong
-