Package com.ultikits.ultitools.websocket
Class CloudRequest
java.lang.Object
com.ultikits.ultitools.websocket.CloudRequest
Immutable protocol request snapshot; internal, not for module use.
Payloads are copied on construction and access because callers must not mutate
another handler's request. Payload validation remains the handler's responsibility.
- Since:
- 6.3.1
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCloudRequest(String id, String type, long ts, String replyTo, com.google.gson.JsonObject payload) Copies an envelope already checked by the protocol parser. -
Method Summary
-
Field Details
-
id
-
type
-
ts
private final long ts -
replyTo
-
payload
private final com.google.gson.JsonObject payload
-
-
Constructor Details
-
CloudRequest
public CloudRequest(String id, String type, long ts, String replyTo, com.google.gson.JsonObject payload) Copies an envelope already checked by the protocol parser.- Parameters:
id- the message ULIDtype- the registered message typets- the sender's epoch-millisecond timestampreplyTo- the correlated request ULID, or null when absentpayload- the non-null payload to copy; it may contain credentials
-
-
Method Details
-
id
- Returns:
- the message ULID, used to correlate replies
-
type
- Returns:
- the registered message type
-
ts
public long ts()- Returns:
- the sender's epoch-millisecond timestamp
-
replyTo
- Returns:
- the correlated request ULID, or null when absent
-
payload
public com.google.gson.JsonObject payload()- Returns:
- a defensive deep copy of the payload; never log its contents
-
toString
-