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 Details

    • MUX_ID

      protected static final short MUX_ID
  • Constructor Details

  • Method Details

    • sendRequest

      public void sendRequest(long requestId, Collection<Address> dest_mbrs, Message msg, RspCollector coll, RequestOptions options) throws 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 data
      coll - 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:
      Exception
    • sendUnicastRequest

      public void sendUnicastRequest(long id, Address target, Message msg, RspCollector coll) throws Exception
      Description copied from class: RequestCorrelator
      Sends a request to a single destination
      Overrides:
      sendUnicastRequest in class RequestCorrelator
      Parameters:
      id -
      target -
      msg -
      coll -
      Throws:
      Exception
    • prepareResponse

      protected void prepareResponse(Message rsp)
      Overrides:
      prepareResponse in class RequestCorrelator