Package bftsmart.tom

Class RequestContext


  • public final class RequestContext
    extends java.lang.Object
    This class contains information related to a client request.
    • Constructor Detail

      • RequestContext

        public RequestContext​(int reqId,
                              int operationId,
                              TOMMessageType requestType,
                              int[] targets,
                              long sendingTime,
                              ReplyListener replyListener,
                              byte[] request)
        Constructor
        Parameters:
        reqId - Request ID
        operationId - Operation ID
        requestType - The request type
        targets - IDs of the targets to which the request was sent
        sendingTime - Sending time
        replyListener - Reply listener associated to the request
        request - Payload of the request
    • Method Detail

      • getReqId

        public final int getReqId()
        Returns the request unique ID
        Returns:
        Request ID
      • getOperationId

        public final int getOperationId()
        Returns the operation ID
        Returns:
        Operation ID
      • getRequestType

        public final TOMMessageType getRequestType()
        Returns the request type
        Returns:
        The request type
      • getSendingTime

        public final long getSendingTime()
        Returns the sending time
        Returns:
        Sending time
      • getReplyListener

        public ReplyListener getReplyListener()
        Returns the reply listener associated to the request
        Returns:
        Reply listener associated to the request
      • getTargets

        public int[] getTargets()
        Returns the IDs of the targets to which the request was sent
        Returns:
        IDs of the targets to which the request was sent
      • getRequest

        public byte[] getRequest()
        The payload of the request
        Returns:
        Payload of the request