|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mule.providers.KeyedPoolMessageDispatcherFactoryAdapter
public class KeyedPoolMessageDispatcherFactoryAdapter
KeyedPoolMessageDispatcherFactoryAdapter
adapts a
UMOMessageDispatcherFactory
with methods from commons-pool
KeyedPoolableObjectFactory
. It is only required for dispatcher
factories that do not inherit from AbstractMessageDispatcherFactory
.
AbstractMessageDispatcherFactory
Constructor Summary | |
---|---|
KeyedPoolMessageDispatcherFactoryAdapter(UMOMessageDispatcherFactory factory)
|
Method Summary | |
---|---|
void |
activate(UMOImmutableEndpoint endpoint,
UMOMessageDispatcher dispatcher)
Invoked before the given dispatcher is handed out to a client, but not after UMOMessageDispatcherFactory.create(UMOImmutableEndpoint) . |
void |
activateObject(Object key,
Object obj)
|
UMOMessageDispatcher |
create(UMOImmutableEndpoint endpoint)
Creates a new message dispatcher instance, initialised with the passed endpoint. |
void |
destroy(UMOImmutableEndpoint endpoint,
UMOMessageDispatcher dispatcher)
Invoked when a dispatcher returned false for
UMOMessageDispatcherFactory.validate(UMOImmutableEndpoint, UMOMessageDispatcher) . |
void |
destroyObject(Object key,
Object obj)
|
boolean |
isCreateDispatcherPerRequest()
Controls whether dispatchers are cached or created per request. |
Object |
makeObject(Object key)
|
void |
passivate(UMOImmutableEndpoint endpoint,
UMOMessageDispatcher dispatcher)
Invoked immediately before the given dispatcher is returned to its pool. |
void |
passivateObject(Object key,
Object obj)
|
boolean |
validate(UMOImmutableEndpoint endpoint,
UMOMessageDispatcher dispatcher)
Invoked after the dispatcher is returned from a client but before it is prepared for return to its pool via UMOMessageDispatcherFactory.passivate(UMOImmutableEndpoint, UMOMessageDispatcher) . |
boolean |
validateObject(Object key,
Object obj)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public KeyedPoolMessageDispatcherFactoryAdapter(UMOMessageDispatcherFactory factory)
Method Detail |
---|
public void activateObject(Object key, Object obj) throws Exception
activateObject
in interface KeyedPoolableObjectFactory
Exception
public void destroyObject(Object key, Object obj) throws Exception
destroyObject
in interface KeyedPoolableObjectFactory
Exception
public Object makeObject(Object key) throws Exception
makeObject
in interface KeyedPoolableObjectFactory
Exception
public void passivateObject(Object key, Object obj) throws Exception
passivateObject
in interface KeyedPoolableObjectFactory
Exception
public boolean validateObject(Object key, Object obj)
validateObject
in interface KeyedPoolableObjectFactory
public boolean isCreateDispatcherPerRequest()
UMOMessageDispatcherFactory
UMOMessageDispatcherFactory.validate(UMOImmutableEndpoint, UMOMessageDispatcher)
it takes
precedence over the dispatcher's own return value of
UMOMessageDispatcher.validate()
.
isCreateDispatcherPerRequest
in interface UMOMessageDispatcherFactory
public UMOMessageDispatcher create(UMOImmutableEndpoint endpoint) throws UMOException
UMOMessageDispatcherFactory
create
in interface UMOMessageDispatcherFactory
endpoint
- the endoint for which this dispatcher should be created
UMOMessageDispatcher
for this
transport
UMOException
- if the dispatcher cannot be createdpublic void activate(UMOImmutableEndpoint endpoint, UMOMessageDispatcher dispatcher) throws UMOException
UMOMessageDispatcherFactory
UMOMessageDispatcherFactory.create(UMOImmutableEndpoint)
.
activate
in interface UMOMessageDispatcherFactory
endpoint
- the endpoint of the dispatcherdispatcher
- the dispatcher to be activated
UMOException
- if the dispatcher cannot be activatedpublic void destroy(UMOImmutableEndpoint endpoint, UMOMessageDispatcher dispatcher)
UMOMessageDispatcherFactory
false
for
UMOMessageDispatcherFactory.validate(UMOImmutableEndpoint, UMOMessageDispatcher)
.
destroy
in interface UMOMessageDispatcherFactory
endpoint
- the endpoint of the dispatcherdispatcher
- the dispatcher to be validatedpublic void passivate(UMOImmutableEndpoint endpoint, UMOMessageDispatcher dispatcher)
UMOMessageDispatcherFactory
passivate
in interface UMOMessageDispatcherFactory
endpoint
- the endpoint of the dispatcherdispatcher
- the dispatcher to be passivatedpublic boolean validate(UMOImmutableEndpoint endpoint, UMOMessageDispatcher dispatcher)
UMOMessageDispatcherFactory
UMOMessageDispatcherFactory.passivate(UMOImmutableEndpoint, UMOMessageDispatcher)
.
validate
in interface UMOMessageDispatcherFactory
endpoint
- the endpoint of the dispatcherdispatcher
- the dispatcher to be validated
true
if the dispatcher is valid for reuse,
false
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |