|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.wadi.group.impl.SharedDispatcher
public class SharedDispatcher
Field Summary | |
---|---|
protected Dispatcher |
_delegate
|
Constructor Summary | |
---|---|
SharedDispatcher(Dispatcher delegate)
|
Method Summary | |
---|---|
void |
addInterceptor(EnvelopeInterceptor interceptor)
|
void |
addRendezVousEnvelope(Envelope envelope)
|
java.util.Collection |
attemptMultiRendezVous(Quipu rv,
long timeout)
|
Envelope |
attemptRendezVous(Quipu rv,
long timeout)
|
Envelope |
createEnvelope()
|
Envelope |
exchangeSend(Address target,
Envelope envelope,
long timeout)
|
Envelope |
exchangeSend(Address target,
Envelope envelope,
long timeout,
java.lang.String targetCorrelationId)
|
Envelope |
exchangeSend(Address target,
java.io.Serializable pojo,
long timeout)
Send a Serializable 'pojo' to 'target' Address - sync - and wait for a reply. |
Envelope |
exchangeSend(Address target,
java.io.Serializable pojo,
long timeout,
java.lang.String targetCorrelationId)
Send a Serializable 'pojo' to a 'target' Address - sync - and wait for a reply. |
Cluster |
getCluster()
|
DispatcherContext |
getContext()
|
java.lang.String |
getPeerName(Address address)
|
Quipu |
newRendezVous(int numLlamas)
|
void |
onEnvelope(Envelope message)
|
void |
register(ServiceEndpoint internalDispatcher)
|
void |
removeInterceptor(EnvelopeInterceptor interceptor)
|
void |
reply(Address from,
Address to,
java.lang.String sourceCorrelationId,
java.io.Serializable body)
|
void |
reply(Envelope request,
Envelope reply)
|
void |
reply(Envelope envelope,
java.io.Serializable body)
|
void |
send(Address source,
Address target,
Quipu quipu,
java.io.Serializable pojo)
send a Serializable 'pojo' to a 'target' Address, with the Message's replyTo field containing the 'source' Address - async - although we are expecting a reply, which will be matched with the sourceCorrelationId. |
void |
send(Address target,
Envelope envelope)
Send a ready-made Message to the Peer at the 'target' Address. |
void |
send(Address target,
Quipu quipu,
java.io.Serializable pojo)
send a Serializable 'pojo' to a 'target' Address, with the Message's replyTo field containing the local cluster Address - async - although we are expecting a reply, which will be matched with the sourceCorrelationId. |
void |
send(Address target,
java.io.Serializable pojo)
send a Serializable pojo to an Address - async - no reply expected |
void |
start()
|
void |
stop()
|
void |
unregister(ServiceEndpoint internalDispatcher,
int nbAttemp,
long delayMillis)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Dispatcher _delegate
Constructor Detail |
---|
public SharedDispatcher(Dispatcher delegate) throws MessageExchangeException
MessageExchangeException
Method Detail |
---|
public DispatcherContext getContext()
getContext
in interface Dispatcher
public void addInterceptor(EnvelopeInterceptor interceptor)
addInterceptor
in interface Dispatcher
public void removeInterceptor(EnvelopeInterceptor interceptor)
removeInterceptor
in interface Dispatcher
public java.util.Collection attemptMultiRendezVous(Quipu rv, long timeout) throws MessageExchangeException
attemptMultiRendezVous
in interface Dispatcher
MessageExchangeException
public Envelope attemptRendezVous(Quipu rv, long timeout) throws MessageExchangeException
attemptRendezVous
in interface Dispatcher
MessageExchangeException
public Envelope createEnvelope()
createEnvelope
in interface Dispatcher
public Envelope exchangeSend(Address target, java.io.Serializable pojo, long timeout) throws MessageExchangeException
Dispatcher
exchangeSend
in interface Dispatcher
target
- The address to which we are sending the Messagepojo
- The object that we want to send inside ittimeout
- The length of time that we are willing to wait for a reply
MessageExchangeException
public Envelope exchangeSend(Address target, java.io.Serializable pojo, long timeout, java.lang.String targetCorrelationId) throws MessageExchangeException
Dispatcher
exchangeSend
in interface Dispatcher
target
- The address to which we are sending the messagepojo
- The object that we wish to sendtimeout
- The length of time that we are willing to wait for a replytargetCorrelationId
- Explicitly identifies the message to which we wish to reply
MessageExchangeException
public Cluster getCluster()
getCluster
in interface Dispatcher
public java.lang.String getPeerName(Address address)
getPeerName
in interface Dispatcher
public void register(ServiceEndpoint internalDispatcher)
register
in interface Dispatcher
public void reply(Address from, Address to, java.lang.String sourceCorrelationId, java.io.Serializable body) throws MessageExchangeException
reply
in interface Dispatcher
MessageExchangeException
public void reply(Envelope envelope, java.io.Serializable body) throws MessageExchangeException
reply
in interface Dispatcher
MessageExchangeException
public void send(Address target, Envelope envelope) throws MessageExchangeException
Dispatcher
send
in interface Dispatcher
target
- The Address of the Peer to which the Message should be sentenvelope
- The Message itself
MessageExchangeException
public void send(Address target, java.io.Serializable pojo) throws MessageExchangeException
Dispatcher
send
in interface Dispatcher
target
- The Address to which we are sending the Messagepojo
- The Object that we want to send inside it
MessageExchangeException
public void send(Address target, Quipu quipu, java.io.Serializable pojo) throws MessageExchangeException
Dispatcher
send
in interface Dispatcher
target
- The Address of the Peer to which this message is to be sentquipu
- The quipu which will be used to match a response on
the source Peerpojo
- The object to be sent in the Message
MessageExchangeException
public void send(Address source, Address target, Quipu quipu, java.io.Serializable pojo) throws MessageExchangeException
Dispatcher
send
in interface Dispatcher
source
- The Address of the Peer to which the reply should be senttarget
- The Address of the Peer to which this message is to be sentquipu
- The correlationId which will be used to match a response on
the source Peerpojo
- The object to be sent in the Message
MessageExchangeException
public void start() throws MessageExchangeException
start
in interface Dispatcher
MessageExchangeException
public void stop() throws MessageExchangeException
stop
in interface Dispatcher
MessageExchangeException
public void unregister(ServiceEndpoint internalDispatcher, int nbAttemp, long delayMillis)
unregister
in interface Dispatcher
public void onEnvelope(Envelope message)
onEnvelope
in interface EnvelopeListener
public Envelope exchangeSend(Address target, Envelope envelope, long timeout, java.lang.String targetCorrelationId) throws MessageExchangeException
exchangeSend
in interface Dispatcher
MessageExchangeException
public Envelope exchangeSend(Address target, Envelope envelope, long timeout) throws MessageExchangeException
exchangeSend
in interface Dispatcher
MessageExchangeException
public void reply(Envelope request, Envelope reply) throws MessageExchangeException
reply
in interface Dispatcher
MessageExchangeException
public void addRendezVousEnvelope(Envelope envelope)
addRendezVousEnvelope
in interface Dispatcher
public Quipu newRendezVous(int numLlamas)
newRendezVous
in interface Dispatcher
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |