org.jgroups.blocks.mux
Class MuxRequestCorrelator
java.lang.Object
org.jgroups.blocks.RequestCorrelator
org.jgroups.blocks.mux.MuxRequestCorrelator
public class MuxRequestCorrelator
- extends RequestCorrelator
A request correlator that adds a mux header to incoming and outgoing messages.
- Author:
- Bela Ban, Paul Ferraro, Brian Stansberry
Field Summary |
protected static short |
MUX_ID
|
Methods inherited from class org.jgroups.blocks.RequestCorrelator |
done, getLocalAddress, getMarshaller, handleRequest, receive, receiveMessage, receiveSuspect, receiveView, registerProbeHandler, sendRequest, setLocalAddress, setMarshaller, setRequestHandler, setSiteUnreachable, start, stop, unregisterProbeHandler |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MUX_ID
protected static final short MUX_ID
MuxRequestCorrelator
public MuxRequestCorrelator(short id,
Protocol transport,
RequestHandler handler,
Address localAddr)
sendRequest
public void sendRequest(long requestId,
java.util.Collection<Address> dest_mbrs,
Message msg,
RspCollector coll,
RequestOptions options)
throws java.lang.Exception
- Description copied from class:
RequestCorrelator
- Sends a request to a group. If no response collector is given, no responses are expected (making the call asynchronous)
- Overrides:
sendRequest
in class RequestCorrelator
- 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 methods
receiveResponse()
and suspect()
will be invoked when a message has been received
or a member is suspected, respectively.
- Throws:
java.lang.Exception
sendUnicastRequest
public void sendUnicastRequest(long id,
Address target,
Message msg,
RspCollector coll)
throws java.lang.Exception
- Description copied from class:
RequestCorrelator
- Sends a request to a single destination
- Overrides:
sendUnicastRequest
in class RequestCorrelator
- Throws:
java.lang.Exception
prepareResponse
protected void prepareResponse(Message rsp)
- Overrides:
prepareResponse
in class RequestCorrelator
Copyright © 1998-2012 Bela Ban / Red Hat. All Rights Reserved.