Class OAuthTokenValidaterStubFactory

java.lang.Object
org.apache.commons.pool.BasePoolableObjectFactory
org.wso2.carbon.andes.authentication.andes.oauth.OAuthTokenValidaterStubFactory
All Implemented Interfaces:
org.apache.commons.pool.PoolableObjectFactory

public class OAuthTokenValidaterStubFactory extends org.apache.commons.pool.BasePoolableObjectFactory
This follows object pool pattern to manage the stub for oauth validation service.
  • Constructor Details

    • OAuthTokenValidaterStubFactory

      public OAuthTokenValidaterStubFactory()
  • Method Details

    • makeObject

      public Object makeObject() throws Exception
      This creates a OAuth2TokenValidationServiceStub object to the pool.
      Specified by:
      makeObject in interface org.apache.commons.pool.PoolableObjectFactory
      Specified by:
      makeObject in class org.apache.commons.pool.BasePoolableObjectFactory
      Returns:
      an OAuthValidationStub object
      Throws:
      Exception - thrown when creating the object.
    • passivateObject

      public void passivateObject(Object o) throws Exception
      This is used to clean up the OAuth validation stub and releases to the object pool.
      Specified by:
      passivateObject in interface org.apache.commons.pool.PoolableObjectFactory
      Overrides:
      passivateObject in class org.apache.commons.pool.BasePoolableObjectFactory
      Parameters:
      o - object that needs to be released.
      Throws:
      Exception - throws when failed to release to the pool