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