public interface MessageRequesterFactory
KeyedPoolableObjectFactory
lifecycle, with a
InboundEndpoint
as the key and the requester as pooled object.Modifier and Type | Method and Description |
---|---|
void |
activate(InboundEndpoint endpoint,
MessageRequester requester)
Invoked before the given requester is handed out to a
client, but not after
create(org.mule.api.endpoint.InboundEndpoint) . |
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
validate(org.mule.api.endpoint.InboundEndpoint, org.mule.api.transport.MessageRequester) . |
boolean |
isCreateRequesterPerRequest()
Controls whether dispatchers are cached or created per request.
|
void |
passivate(InboundEndpoint endpoint,
MessageRequester requester)
Invoked immediately before the given requester is returned
to its pool.
|
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
passivate(org.mule.api.endpoint.InboundEndpoint, org.mule.api.transport.MessageRequester) . |
boolean isCreateRequesterPerRequest()
validate(org.mule.api.endpoint.InboundEndpoint, org.mule.api.transport.MessageRequester)
it takes
precedence over the dispatcher's own return value of
MessageDispatcher.validate()
.MessageRequester create(InboundEndpoint endpoint) throws MuleException
endpoint
- the endoint for which this requester should be createdMessageRequester
for this
transportMuleException
- if the requester cannot be createdvoid activate(InboundEndpoint endpoint, MessageRequester requester) throws MuleException
create(org.mule.api.endpoint.InboundEndpoint)
.endpoint
- the endpoint of the requesterrequester
- the requester to be activatedMuleException
- if the requester cannot be activatedboolean validate(InboundEndpoint endpoint, MessageRequester requester)
passivate(org.mule.api.endpoint.InboundEndpoint, org.mule.api.transport.MessageRequester)
.endpoint
- the endpoint of the requesterrequester
- the requester to be validatedtrue
if the requester is valid for reuse,
false
otherwise.void passivate(InboundEndpoint endpoint, MessageRequester requester)
endpoint
- the endpoint of the requesterrequester
- the requester to be passivatedvoid destroy(InboundEndpoint endpoint, MessageRequester requester)
false
for
validate(org.mule.api.endpoint.InboundEndpoint, org.mule.api.transport.MessageRequester)
.endpoint
- the endpoint of the requesterrequester
- the requester to be validatedCopyright © 2003–2015 MuleSoft, Inc.. All rights reserved.