Package bftsmart.tom
Class RequestContext
- java.lang.Object
-
- bftsmart.tom.RequestContext
-
public final class RequestContext extends java.lang.Object
This class contains information related to a client request.
-
-
Constructor Summary
Constructors Constructor Description RequestContext(int reqId, int operationId, TOMMessageType requestType, int[] targets, long sendingTime, ReplyListener replyListener, byte[] request)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getOperationId()
Returns the operation IDReplyListener
getReplyListener()
Returns the reply listener associated to the requestint
getReqId()
Returns the request unique IDbyte[]
getRequest()
The payload of the requestTOMMessageType
getRequestType()
Returns the request typelong
getSendingTime()
Returns the sending timeint[]
getTargets()
Returns the IDs of the targets to which the request was sent
-
-
-
Constructor Detail
-
RequestContext
public RequestContext(int reqId, int operationId, TOMMessageType requestType, int[] targets, long sendingTime, ReplyListener replyListener, byte[] request)
Constructor- Parameters:
reqId
- Request IDoperationId
- Operation IDrequestType
- The request typetargets
- IDs of the targets to which the request was sentsendingTime
- Sending timereplyListener
- Reply listener associated to the requestrequest
- 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
-
-