Class ExecutePayloadReply

java.lang.Object
pt.unl.fct.di.novasys.babel.generic.ProtoIPC
pt.unl.fct.di.novasys.babel.generic.ProtoReply

public class ExecutePayloadReply extends CommonExecuteReply
A reply of an operation parsed as simple byte array. It stores information about the result of the operation as well as the type of operation (e.g., READ, UPDATE, etc.) issued.
  • Field Details

  • Constructor Details

    • ExecutePayloadReply

      public ExecutePayloadReply(CommonOperationStatus status, CommonOperationType type, String keySpace, String collection, String objectID, byte[] data)
      Creates a execute payload reply with the status of the operation, the type of operation issued, and the data representing the result.
      Parameters:
      status - the status of the operation.
      type - the type of operation committed.
      keySpace - the keySpace where the operation was executed
      collection - the collection where the operation was executed
      objectID - the identifier of the object
      data - the result of the operation.
    • ExecutePayloadReply

      public ExecutePayloadReply(CommonOperationStatus status, CommonOperationType type, byte[] data)
      Creates a execute payload reply with the status of the operation, the type of operation issued, and the data representing the result. No information about the keySpace or collection is passed.
      Parameters:
      status - the status of the operation.
      type - the type of operation committed.
      data - the result of the operation.
    • ExecutePayloadReply

      public ExecutePayloadReply(CommonOperationStatus status, CommonOperationType type, String keySpace, String collection, String objectID, String message, byte[] data)
      Creates a execute payload reply with the status of the operation, the type of operation issued, and the data representing the result.The message should detail the status of the operation.
      Parameters:
      status - the status of the operation.
      type - the type of operation committed.
      keySpace - the keySpace where the operation was executed
      collection - the collection where the operation was executed
      objectID - the identifier of the object
      message - a message detailing the status.
      data - the result of the operation.
    • ExecutePayloadReply

      public ExecutePayloadReply(CommonOperationStatus status, CommonOperationType type, String keySpace, String collection, String objectID, String message, byte[] data, String reqID)
      Creates a execute payload reply with the status of the operation, the type of operation issued, and the data representing the result.The message should detail the status of the operation. Additionally, the reply also stores the request identifier associated with the reply.
      Parameters:
      status - the status of the operation.
      type - the type of operation committed.
      keySpace - the keySpace where the operation was executed
      collection - the collection where the operation was executed
      objectID - the identifier of the object
      message - a message detailing the status.
      data - the result of the operation.
      reqID - the request identifier associated with the reply.
  • Method Details

    • getPayload

      public byte[] getPayload()
      Gets the payload of the reply (i.e., the response data)
      Returns:
      the payload of the reply.