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