public abstract class TextProtocol.Message extends Object implements TextProtocol.WireFormatable
| Modifier and Type | Field and Description |
|---|---|
protected String |
messagePrefixNocheck |
protected String |
sendVersion |
| Modifier | Constructor and Description |
|---|---|
protected |
Message()
The constructor used for the original non-serialized instance of the
message, which does not use the line or tokens.
|
protected |
Message(String line,
String[] tokens)
Every message must define a constructor of this form so that it can
be de-serialized.
|
| Modifier and Type | Method and Description |
|---|---|
protected int |
getCurrentTokenPosition()
Returns the current token position in the payload.
|
protected String |
getMessagePrefix() |
abstract TextProtocol.MessageOp |
getOp() |
TextProtocol |
getProtocol()
Returns the protocol associated with this message
|
int |
getSenderId() |
String |
getSendVersion() |
protected boolean |
hasMoreTokens() |
protected String |
nextPayloadToken()
Returns the next token in the payload.
|
void |
setSendVersion(String version) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitwireFormatprotected String sendVersion
protected String messagePrefixNocheck
protected Message()
protected Message(String line, String[] tokens) throws TextProtocol.InvalidMessageException
line - the line constituting the messagetokens - the line in token formTextProtocol.InvalidMessageExceptionEnvironmentFailureException - on format errorspublic int getSenderId()
public void setSendVersion(String version)
public String getSendVersion()
protected String getMessagePrefix()
public abstract TextProtocol.MessageOp getOp()
public TextProtocol getProtocol()
protected String nextPayloadToken() throws TextProtocol.InvalidMessageException
TextProtocol.InvalidMessageExceptionprotected boolean hasMoreTokens()
protected int getCurrentTokenPosition()
Copyright © 2024. All rights reserved.