Class BatchedPushRequests

java.lang.Object
org.kobe.xbot.Utilities.Entities.Requests
org.kobe.xbot.Utilities.Entities.BatchedPushRequests

public class BatchedPushRequests extends Requests
  • Constructor Details

    • BatchedPushRequests

      public BatchedPushRequests()
  • Method Details

    • getData

      public List<XTableProto.XTableMessage> getData()
    • publish

      public boolean publish(String key, byte[] value)
      Publishes a message with a specified key and value to the push socket. The message is sent with the "PUBLISH" command.
      Overrides:
      publish in class Requests
      Parameters:
      key - The key associated with the message being published.
      value - The value (byte array) to be published with the key.
      Returns:
      true if the message was successfully sent, false otherwise.
    • sendBatchedPushRequests

      public boolean sendBatchedPushRequests(BatchedPushRequests batchedPushRequests)
      this method is blocked in this class
      Overrides:
      sendBatchedPushRequests in class Requests
      Parameters:
      batchedPushRequests - The collection of push requests to be sent. This should contain the data that will be part of the batched message.
      Returns:
      true if the batched push requests were successfully sent; false otherwise.
    • sendPutMessage

      protected boolean sendPutMessage(String key, byte[] value, XTableProto.XTableMessage.Type type)
      Sends a message via the PUSH socket to the server.

      This helper method builds an XTableMessage and sends it using the PUSH socket. The message contains the specified key, command, value, and type.

      Overrides:
      sendPutMessage in class Requests
      Parameters:
      key - The key associated with the value.
      value - The byte array representing the value to be sent.
      type - The type of the value being sent (e.g., STRING, INT64, etc.).
      Returns:
      True if the message was sent successfully; otherwise, false.