|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MessageDispatcherFactory
MessageDispatcherFactory
is a factory interface for managing the
lifecycles of a transport's message dispatchers. The methods basically implement
the KeyedPoolableObjectFactory
lifecycle, with a
ImmutableEndpoint
as the key and the dispatcher as pooled object.
Method Summary | |
---|---|
void |
activate(OutboundEndpoint endpoint,
MessageDispatcher dispatcher)
Invoked before the given dispatcher is handed out to a client, but not after create(OutboundEndpoint) . |
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
validate(OutboundEndpoint, MessageDispatcher) . |
boolean |
isCreateDispatcherPerRequest()
Controls whether dispatchers are cached or created per request. |
void |
passivate(OutboundEndpoint endpoint,
MessageDispatcher dispatcher)
Invoked immediately before the given dispatcher is returned to its pool. |
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 passivate(OutboundEndpoint, MessageDispatcher) . |
Method Detail |
---|
boolean isCreateDispatcherPerRequest()
validate(OutboundEndpoint, MessageDispatcher)
it takes
precedence over the dispatcher's own return value of
MessageDispatcher.validate()
.
MessageDispatcher create(OutboundEndpoint endpoint) throws MuleException
endpoint
- the endoint for which this dispatcher should be created
MessageDispatcher
for this
transport
MuleException
- if the dispatcher cannot be createdvoid activate(OutboundEndpoint endpoint, MessageDispatcher dispatcher) throws MuleException
create(OutboundEndpoint)
.
endpoint
- the endpoint of the dispatcherdispatcher
- the dispatcher to be activated
MuleException
- if the dispatcher cannot be activatedboolean validate(OutboundEndpoint endpoint, MessageDispatcher dispatcher)
passivate(OutboundEndpoint, MessageDispatcher)
.
endpoint
- the endpoint of the dispatcherdispatcher
- the dispatcher to be validated
true
if the dispatcher is valid for reuse,
false
otherwise.void passivate(OutboundEndpoint endpoint, MessageDispatcher dispatcher)
endpoint
- the endpoint of the dispatcherdispatcher
- the dispatcher to be passivatedvoid destroy(OutboundEndpoint endpoint, MessageDispatcher dispatcher)
false
for
validate(OutboundEndpoint, MessageDispatcher)
.
endpoint
- the endpoint of the dispatcherdispatcher
- the dispatcher to be validated
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |