Record Class ScriptMessage
java.lang.Object
java.lang.Record
com.botwithus.bot.api.isc.ScriptMessage
- Record Components:
channel- the channel the message was published onsender- identifier of the sending scriptpayload- the message payloadtimestamp- epoch millis when the message was createdrequestId- correlation ID for request/response patterns, or null for pub/sub
-
Constructor Summary
ConstructorsConstructorDescriptionScriptMessage(String channel, String sender, Object payload, long timestamp) Backward-compatible constructor for pub/sub messages.ScriptMessage(String channel, String sender, Object payload, long timestamp, String requestId) Creates an instance of aScriptMessagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionchannel()Returns the value of thechannelrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns true if this message is part of a request/response exchange.payload()Returns the value of thepayloadrecord component.Returns the value of therequestIdrecord component.sender()Returns the value of thesenderrecord component.longReturns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ScriptMessage
-
ScriptMessage
-
-
Method Details
-
isRequest
public boolean isRequest()Returns true if this message is part of a request/response exchange. -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
channel
-
sender
-
payload
-
timestamp
-
requestId
-