|
MenuCommand | readCommandFromStream () throws IOException |
|
void | sendMenuCommand (MenuCommand msg) throws IOException |
|
abstract boolean | isDeviceConnected () |
|
abstract String | getConnectionName () |
|
abstract boolean | canSendMessageNow (MenuCommand cmd) |
|
|
static boolean | doesBufferHaveEOM (ByteBuffer inputBuffer) |
|
|
| SharedStreamConnection (MenuCommandProtocol protocol) |
|
void | readCompleteMessage (ByteBuffer inputBuffer) throws IOException |
|
abstract void | getAtLeastBytes (ByteBuffer inputBuffer, int len, StreamRemoteConnector.ReadMode mode) throws IOException |
|
void | logByteBuffer (String msg, ByteBuffer inBuffer) |
|
void | connectionLog (System.Logger.Level l, String s) |
|
abstract void | sendInternal (ByteBuffer cmdBuffer) throws IOException |
|
|
final System.Logger | logger = System.getLogger(getClass().getSimpleName()) |
|
final MenuCommandProtocol | protocol |
|
final ByteBuffer | inputBuffer = ByteBuffer.allocate(MAX_MSG_EXPECTED).order(ByteOrder.BIG_ENDIAN) |
|
final ByteBuffer | cmdBuffer = ByteBuffer.allocate(MAX_MSG_EXPECTED).order(ByteOrder.BIG_ENDIAN) |
|
|
static final int | MAX_MSG_EXPECTED = 1024 |
|
◆ getAtLeastBytes()
abstract void com.thecoderscorner.menu.remote.SharedStreamConnection.getAtLeastBytes |
( |
ByteBuffer |
inputBuffer, |
|
|
int |
len, |
|
|
StreamRemoteConnector.ReadMode |
mode |
|
) |
| throws IOException |
|
abstractprotected |
◆ logByteBuffer()
void com.thecoderscorner.menu.remote.SharedStreamConnection.logByteBuffer |
( |
String |
msg, |
|
|
ByteBuffer |
inBuffer |
|
) |
| |
|
protected |
Helper method that logs the entire message buffer when at debug logging level.
- Parameters
-
msg | the message to print first |
inBuffer | the buffer to be logged |
◆ sendMenuCommand()
void com.thecoderscorner.menu.remote.SharedStreamConnection.sendMenuCommand |
( |
MenuCommand |
msg | ) |
throws IOException |
Sends a command to the remote with the protocol and usual headers.
- Parameters
-
- Exceptions
-
IOException | if there are issues with the transport |
The documentation for this class was generated from the following file:
- src/main/java/com/thecoderscorner/menu/remote/SharedStreamConnection.java