Class StagedMessage
java.lang.Object
net.vincent.communidirect.client.util.StagedMessage
Immutable data bag for a message that has been composed but not yet sent.
Instances are produced by
MessageParser from either a raw editor
temp-file or a persisted staged TOML file.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionStagedMessage(String targetIp, int port, String keyName, String body) Constructs aStagedMessage, trimming whitespace from string fields and guarding againstnullinputs. -
Method Summary
-
Field Details
-
targetIp
Destination IPv4/IPv6 address or hostname for message delivery. -
port
public final int portDestination TCP port for the remote server. -
keyName
Alias of the recipient's public key in the local key store. -
body
Plaintext message body.
-
-
Constructor Details
-
StagedMessage
Constructs aStagedMessage, trimming whitespace from string fields and guarding againstnullinputs.- Parameters:
targetIp- destination IPv4/IPv6 address or hostnameport- destination TCP port (1–65535)keyName- alias of the recipient's public key in the local key storebody- plaintext message body
-
-
Method Details
-
isValid
public boolean isValid()Returnstruewhen all required fields are filled in.- Returns:
trueif targetIp, keyName, and body are all non-empty;falseotherwise
-
toString
-