Package org.jgroups.blocks.mux
Class MuxRequestCorrelator
java.lang.Object
org.jgroups.blocks.RequestCorrelator
org.jgroups.blocks.mux.MuxRequestCorrelator
A request correlator that adds a mux header to incoming and outgoing messages.
- Author:
- Bela Ban, Paul Ferraro, Brian Stansberry
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jgroups.blocks.RequestCorrelator
RequestCorrelator.Header, RequestCorrelator.MultiDestinationHeader -
Field Summary
FieldsFields inherited from class org.jgroups.blocks.RequestCorrelator
id, local_addr, log, marshaller, request_handler, requests, started, transport -
Constructor Summary
ConstructorsConstructorDescriptionMuxRequestCorrelator(short id, Object transport, RequestHandler handler, Address localAddr) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprepareResponse(Message rsp) voidsendRequest(long requestId, Collection<Address> dest_mbrs, Message msg, RspCollector coll, RequestOptions options) Sends a request to a group.voidsendUnicastRequest(long id, Address target, Message msg, RspCollector coll) Sends a request to a single destinationMethods inherited from class org.jgroups.blocks.RequestCorrelator
done, getLocalAddress, getMarshaller, handleRequest, receive, receiveMessage, receiveSuspect, receiveView, registerProbeHandler, sendRequest, sendRequest, setConcurrentProcessing, setDeadlockDetection, setLocalAddress, setMarshaller, setRequestHandler, start, stop, unregisterProbeHandler
-
Field Details
-
MUX_ID
protected static final short MUX_ID
-
-
Constructor Details
-
MuxRequestCorrelator
-
-
Method Details
-
sendRequest
public void sendRequest(long requestId, Collection<Address> dest_mbrs, Message msg, RspCollector coll, RequestOptions options) throws Exception Description copied from class:RequestCorrelatorSends a request to a group. If no response collector is given, no responses are expected (making the call asynchronous)- Overrides:
sendRequestin classRequestCorrelator- Parameters:
requestId- The request ID. Must be unique for this JVM (e.g. current time in millisecs)dest_mbrs- The list of members who should receive the call. Usually a group RPC is sent via multicast, but a receiver drops the request if its own address is not in this list. Will not be used if it is null.msg- The request to be sent. The body of the message carries the request datacoll- A response collector (usually the object that invokes this method). Its methodsreceiveResponse()andsuspect()will be invoked when a message has been received or a member is suspected, respectively.- Throws:
Exception
-
sendUnicastRequest
public void sendUnicastRequest(long id, Address target, Message msg, RspCollector coll) throws Exception Description copied from class:RequestCorrelatorSends a request to a single destination- Overrides:
sendUnicastRequestin classRequestCorrelator- Parameters:
id-target-msg-coll-- Throws:
Exception
-
prepareResponse
- Overrides:
prepareResponsein classRequestCorrelator
-