MenuCommandProtocolpublic class TagValMenuCommandProtocol extends Object implements MenuCommandProtocol
| Constructor | Description |
|---|---|
TagValMenuCommandProtocol() |
| Modifier and Type | Method | Description |
|---|---|---|
MenuCommand |
fromChannel(ByteBuffer buffer) |
Retrieves a message from the channel, or throws an exception if the message is not fully formed.
|
byte |
getKeyIdentifier() |
returns the identifier for this protocol, when used in messages
|
void |
toChannel(ByteBuffer buffer,
MenuCommand cmd) |
Puts the command specified into the byte buffer, it is assumed that the callee will flip the
channel once complete.
|
public MenuCommand fromChannel(ByteBuffer buffer) throws IOException
MenuCommandProtocolfromChannel in interface MenuCommandProtocolIOExceptionpublic void toChannel(ByteBuffer buffer, MenuCommand cmd)
MenuCommandProtocoltoChannel in interface MenuCommandProtocolbuffer - to write the data tocmd - the command to writepublic byte getKeyIdentifier()
MenuCommandProtocolgetKeyIdentifier in interface MenuCommandProtocolCopyright © 2018. All rights reserved.