Package org.kobe.xbot.Utilities.Entities
Class BatchedPushRequests
java.lang.Object
org.kobe.xbot.Utilities.Entities.Requests
org.kobe.xbot.Utilities.Entities.BatchedPushRequests
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetData()
boolean
Publishes a message with a specified key and value to the push socket.boolean
sendBatchedPushRequests
(BatchedPushRequests batchedPushRequests) this method is blocked in this classprotected boolean
sendPutMessage
(String key, byte[] value, XTableProto.XTableMessage.Type type) Sends a message via the PUSH socket to the server.Methods inherited from class org.kobe.xbot.Utilities.Entities.Requests
_getXTablesDataProto, delete, delete, getBoolean, getBooleanList, getBytes, getBytesList, getCoordinates, getDouble, getDoubleList, getFloatList, getInteger, getIntegerList, getLong, getLongList, getPing, getPose2d, getPose3d, getRawBytes, getRawJson, getServerStatistics, getString, getStringList, getTables, getTables, getUnknownBytes, putBoolean, putBooleanList, putBytes, putBytes, putBytesList, putCoordinates, putDouble, putDoubleList, putFloatList, putInteger, putIntegerList, putLong, putLongList, putPose2d, putPose3d, putString, putStringList, putTypedBytes, putUnknownBytes, reboot, reconnectRequestSocket, set, set, setServerDebug, setSockets
-
Constructor Details
-
BatchedPushRequests
public BatchedPushRequests()
-
-
Method Details
-
getData
-
publish
Publishes a message with a specified key and value to the push socket. The message is sent with the "PUBLISH" command. -
sendBatchedPushRequests
this method is blocked in this class- Overrides:
sendBatchedPushRequests
in classRequests
- 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
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 classRequests
- 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.
-