Class TechUserKeyedSessionPoolFactory

java.lang.Object
org.apache.commons.pool2.BaseObject
org.apache.commons.pool2.BaseKeyedPooledObjectFactory<com.lexmark.saperion.remote.common.authentication.Credentials,com.saperion.connector.authentication.Session>
com.saperion.connector.pool.GenericKeyedSessionPoolFactory
com.saperion.connector.pool.TechUserKeyedSessionPoolFactory
All Implemented Interfaces:
org.apache.commons.pool2.KeyedPooledObjectFactory<com.lexmark.saperion.remote.common.authentication.Credentials,com.saperion.connector.authentication.Session>

public class TechUserKeyedSessionPoolFactory extends GenericKeyedSessionPoolFactory
This factory only allows to create ClassicConnector instances for technical users only. If this is not a technical user then an exception occurs
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.commons.pool2.PooledObject<com.saperion.connector.authentication.Session>
    makeObject(com.lexmark.saperion.remote.common.authentication.Credentials credentials)
    This method will be called, when no idle connection is available.

    Methods inherited from class com.saperion.connector.pool.GenericKeyedSessionPoolFactory

    create, createConnector, destroyObject, init, init, validateObject, wrap

    Methods inherited from class org.apache.commons.pool2.BaseKeyedPooledObjectFactory

    activateObject, passivateObject

    Methods inherited from class org.apache.commons.pool2.BaseObject

    toString, toStringAppendFields

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface org.apache.commons.pool2.KeyedPooledObjectFactory

    activateObject, passivateObject
  • Constructor Details

    • TechUserKeyedSessionPoolFactory

      public TechUserKeyedSessionPoolFactory()
  • Method Details

    • makeObject

      public org.apache.commons.pool2.PooledObject<com.saperion.connector.authentication.Session> makeObject(com.lexmark.saperion.remote.common.authentication.Credentials credentials) throws Exception
      This method will be called, when no idle connection is available. A new SaClassicConnector will be created.
      Specified by:
      makeObject in interface org.apache.commons.pool2.KeyedPooledObjectFactory<com.lexmark.saperion.remote.common.authentication.Credentials,com.saperion.connector.authentication.Session>
      Overrides:
      makeObject in class GenericKeyedSessionPoolFactory
      Parameters:
      credentials - the key to make a new session for
      Returns:
      the created SaClassicConnector.
      Throws:
      Exception - if an error occurs.