|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mule.transport.KeyedPoolMessageDispatcherFactoryAdapter
public class KeyedPoolMessageDispatcherFactoryAdapter
KeyedPoolMessageDispatcherFactoryAdapter adapts a
MessageDispatcherFactory with methods from commons-pool
KeyedPoolableObjectFactory. It is only required for dispatcher
factories that do not inherit from AbstractMessageDispatcherFactory.
AbstractMessageDispatcherFactory| Constructor Summary | |
|---|---|
KeyedPoolMessageDispatcherFactoryAdapter(MessageDispatcherFactory factory)
|
|
| Method Summary | |
|---|---|
void |
activate(OutboundEndpoint endpoint,
MessageDispatcher dispatcher)
Invoked before the given dispatcher is handed out to a client, but not after MessageDispatcherFactory.create(OutboundEndpoint). |
void |
activateObject(Object key,
Object obj)
|
protected void |
applyLifecycle(MessageDispatcher dispatcher)
|
MessageDispatcher |
create(OutboundEndpoint endpoint)
Creates a new message dispatcher instance, initialised with the passed endpoint. |
void |
destroy(OutboundEndpoint endpoint,
MessageDispatcher dispatcher)
Invoked when a dispatcher returned false for
MessageDispatcherFactory.validate(OutboundEndpoint, MessageDispatcher). |
void |
destroyObject(Object key,
Object obj)
|
boolean |
isCreateDispatcherPerRequest()
Controls whether dispatchers are cached or created per request. |
Object |
makeObject(Object key)
|
void |
passivate(OutboundEndpoint endpoint,
MessageDispatcher dispatcher)
Invoked immediately before the given dispatcher is returned to its pool. |
void |
passivateObject(Object key,
Object obj)
|
boolean |
validate(OutboundEndpoint endpoint,
MessageDispatcher dispatcher)
Invoked after the dispatcher is returned from a client but before it is prepared for return to its pool via MessageDispatcherFactory.passivate(OutboundEndpoint, MessageDispatcher). |
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(MessageDispatcherFactory factory)
| Method Detail |
|---|
public void activateObject(Object key,
Object obj)
throws Exception
activateObject in interface org.apache.commons.pool.KeyedPoolableObjectFactoryException
public void destroyObject(Object key,
Object obj)
throws Exception
destroyObject in interface org.apache.commons.pool.KeyedPoolableObjectFactoryException
public Object makeObject(Object key)
throws Exception
makeObject in interface org.apache.commons.pool.KeyedPoolableObjectFactoryException
public void passivateObject(Object key,
Object obj)
throws Exception
passivateObject in interface org.apache.commons.pool.KeyedPoolableObjectFactoryException
public boolean validateObject(Object key,
Object obj)
validateObject in interface org.apache.commons.pool.KeyedPoolableObjectFactorypublic boolean isCreateDispatcherPerRequest()
MessageDispatcherFactoryMessageDispatcherFactory.validate(OutboundEndpoint, MessageDispatcher) it takes
precedence over the dispatcher's own return value of
MessageDispatcher.validate().
isCreateDispatcherPerRequest in interface MessageDispatcherFactory
public MessageDispatcher create(OutboundEndpoint endpoint)
throws MuleException
MessageDispatcherFactory
create in interface MessageDispatcherFactoryendpoint - the endoint for which this dispatcher should be created
MessageDispatcher for this
transport
MuleException - if the dispatcher cannot be created
public void activate(OutboundEndpoint endpoint,
MessageDispatcher dispatcher)
throws MuleException
MessageDispatcherFactoryMessageDispatcherFactory.create(OutboundEndpoint).
activate in interface MessageDispatcherFactoryendpoint - the endpoint of the dispatcherdispatcher - the dispatcher to be activated
MuleException - if the dispatcher cannot be activated
public void destroy(OutboundEndpoint endpoint,
MessageDispatcher dispatcher)
MessageDispatcherFactoryfalse for
MessageDispatcherFactory.validate(OutboundEndpoint, MessageDispatcher).
destroy in interface MessageDispatcherFactoryendpoint - the endpoint of the dispatcherdispatcher - the dispatcher to be validated
public void passivate(OutboundEndpoint endpoint,
MessageDispatcher dispatcher)
MessageDispatcherFactory
passivate in interface MessageDispatcherFactoryendpoint - the endpoint of the dispatcherdispatcher - the dispatcher to be passivated
public boolean validate(OutboundEndpoint endpoint,
MessageDispatcher dispatcher)
MessageDispatcherFactoryMessageDispatcherFactory.passivate(OutboundEndpoint, MessageDispatcher).
validate in interface MessageDispatcherFactoryendpoint - the endpoint of the dispatcherdispatcher - the dispatcher to be validated
true if the dispatcher is valid for reuse,
false otherwise.
protected void applyLifecycle(MessageDispatcher dispatcher)
throws MuleException
MuleException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||