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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThis creates a OAuth2TokenValidationServiceStub object to the pool.voidThis is used to clean up the OAuth validation stub and releases to the object pool.Methods inherited from class org.apache.commons.pool.BasePoolableObjectFactory
activateObject, destroyObject, validateObject
-
Constructor Details
-
OAuthTokenValidaterStubFactory
public OAuthTokenValidaterStubFactory()
-
-
Method Details
-
makeObject
This creates a OAuth2TokenValidationServiceStub object to the pool.- Specified by:
makeObjectin interfaceorg.apache.commons.pool.PoolableObjectFactory- Specified by:
makeObjectin classorg.apache.commons.pool.BasePoolableObjectFactory- Returns:
- an OAuthValidationStub object
- Throws:
Exception- thrown when creating the object.
-
passivateObject
This is used to clean up the OAuth validation stub and releases to the object pool.- Specified by:
passivateObjectin interfaceorg.apache.commons.pool.PoolableObjectFactory- Overrides:
passivateObjectin classorg.apache.commons.pool.BasePoolableObjectFactory- Parameters:
o- object that needs to be released.- Throws:
Exception- throws when failed to release to the pool
-