public abstract class TextProtocol.Message extends java.lang.Object implements TextProtocol.WireFormatable
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
messagePrefixNocheck |
protected java.lang.String |
sendVersion |
Modifier | Constructor and Description |
---|---|
protected |
TextProtocol.Message()
The constructor used for the original non-serialized instance of the
message, which does not use the line or tokens.
|
protected |
TextProtocol.Message(java.lang.String line,
java.lang.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 java.lang.String |
getMessagePrefix() |
abstract TextProtocol.MessageOp |
getOp() |
TextProtocol |
getProtocol()
Returns the protocol associated with this message
|
int |
getSenderId() |
java.lang.String |
getSendVersion() |
protected java.lang.String |
nextPayloadToken()
Returns the next token in the payload.
|
void |
setSendVersion(java.lang.String version) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
wireFormat
protected java.lang.String sendVersion
protected java.lang.String messagePrefixNocheck
protected TextProtocol.Message()
protected TextProtocol.Message(java.lang.String line, java.lang.String[] tokens) throws TextProtocol.InvalidMessageException
line
- the line constituting the messagetokens
- the line in token formTextProtocol.InvalidMessageException
EnvironmentFailureException
- on format errorspublic int getSenderId()
public void setSendVersion(java.lang.String version)
public java.lang.String getSendVersion()
protected java.lang.String getMessagePrefix()
public abstract TextProtocol.MessageOp getOp()
public TextProtocol getProtocol()
protected java.lang.String nextPayloadToken() throws TextProtocol.InvalidMessageException
TextProtocol.InvalidMessageException
protected int getCurrentTokenPosition()
Copyright (c) 2004-2012 Oracle. All rights reserved.