|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mule.security.oauth.BaseOAuthClientFactory
public abstract class BaseOAuthClientFactory
| Constructor Summary | |
|---|---|
BaseOAuthClientFactory(OAuth2Manager<OAuth2Adapter> oauthManager,
ObjectStore<Serializable> objectStore)
|
|
| Method Summary | |
|---|---|
void |
activateObject(String key,
OAuth2Adapter obj)
This default implementation does nothing |
void |
destroyObject(String key,
OAuth2Adapter obj)
If obj implements Stoppable or
Disposable, the object is destroyed by invoking
the corresponding methods |
protected abstract Class<? extends OAuth2Adapter> |
getAdapterClass()
Returns the class of the concrete implementation of OAuth2Adapter that this factory is supposed to
generate |
OAuth2Adapter |
makeObject(String key)
This method creates an instance of OAuth2Adapter which concrete type depends on
the return of
oauth.BaseOAuthClientFactory.getAdapterClass The
adapter is fully initialized and interfaces such as
Initialisable,
MuleContextAware and
Startable are respected by invoking the
corresponding methods in case the adapter implements them. |
void |
passivateObject(String key,
OAuth2Adapter obj)
Passivates the object by updating the state of the persisted object with the one of the given one. |
protected abstract void |
setCustomAdapterProperties(OAuth2Adapter adapter,
org.mule.common.security.oauth.OAuthState state)
Implementors can levarage this method to move custom property values from the state to the adapter You can leave this method blank if not needed in your case. |
protected abstract void |
setCustomStateProperties(OAuth2Adapter adapter,
org.mule.common.security.oauth.OAuthState state)
Implementos can leverage this method to move custom property values from the adapter to the state. |
boolean |
validateObject(String key,
OAuth2Adapter obj)
Validates the object by checking that it exists at the object store and that the state of the given object is consisten with the persisted state |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BaseOAuthClientFactory(OAuth2Manager<OAuth2Adapter> oauthManager,
ObjectStore<Serializable> objectStore)
| Method Detail |
|---|
protected abstract Class<? extends OAuth2Adapter> getAdapterClass()
OAuth2Adapter that this factory is supposed to
generate
protected abstract void setCustomAdapterProperties(OAuth2Adapter adapter,
org.mule.common.security.oauth.OAuthState state)
adapter - a OAuth2Adapter which supports
custom propertiesstate - a OAuth2Adapter which is carrying
custom properties.
protected abstract void setCustomStateProperties(OAuth2Adapter adapter,
org.mule.common.security.oauth.OAuthState state)
adapter - a OAuth2Adapter which is
carrying custom propertiesstate - a OAuth2Adapter
public final OAuth2Adapter makeObject(String key)
throws Exception
OAuth2Adapter which concrete type depends on
the return of
oauth.BaseOAuthClientFactory.getAdapterClass The
adapter is fully initialized and interfaces such as
Initialisable,
MuleContextAware and
Startable are respected by invoking the
corresponding methods in case the adapter implements them. Finally, the
org.mule.security.oauth.OAuth2Connector.postAuth() method is invoked.
makeObject in interface org.apache.commons.pool.KeyedPoolableObjectFactory<String,OAuth2Adapter>the - key of the object at the object store
Exception
public final void destroyObject(String key,
OAuth2Adapter obj)
throws Exception
Stoppable or
Disposable, the object is destroyed by invoking
the corresponding methods
destroyObject in interface org.apache.commons.pool.KeyedPoolableObjectFactory<String,OAuth2Adapter>key - the key of the object at the object storeobj - an instance of OAuth2Adapter
IllegalArgumetException - if obj is not an instance of the type returned
by org.mule.security.oauth.BaseOAuthClientFactory.getAdapterClass()
Exception
public final boolean validateObject(String key,
OAuth2Adapter obj)
validateObject in interface org.apache.commons.pool.KeyedPoolableObjectFactory<String,OAuth2Adapter>key - the key of the object at the object storeobj - an instance of OAuth2Adapter
IllegalArgumetException - if obj is not an instance of the type returned
by org.mule.security.oauth.BaseOAuthClientFactory.getAdapterClass()
public void activateObject(String key,
OAuth2Adapter obj)
throws Exception
activateObject in interface org.apache.commons.pool.KeyedPoolableObjectFactory<String,OAuth2Adapter>Exception
public final void passivateObject(String key,
OAuth2Adapter obj)
throws Exception
passivateObject in interface org.apache.commons.pool.KeyedPoolableObjectFactory<String,OAuth2Adapter>key - the key of the object at the object storeobj - an instance of OAuth2Adapter
IllegalArgumetException - if obj is not an instance of the type returned
by org.mule.security.oauth.BaseOAuthClientFactory.getAdapterClass()
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||