Public Member Functions | |
int | getHeartbeatFrequency () |
void | closeConnection () |
long | lastReceivedHeartbeat () |
long | lastTransmittedHeartbeat () |
void | sendCommand (MenuCommand command) |
void | registerConnectionListener (BiConsumer< ServerConnection, Boolean > connectionListener) |
void | registerMessageHandler (BiConsumer< ServerConnection, MenuCommand > messageHandler) |
void | setConnectionMode (ServerConnectionMode mode) |
ServerConnectionMode | getConnectionMode () |
String | getUserName () |
Public Member Functions inherited from com.thecoderscorner.menu.remote.RemoteDevice | |
String | getConnectionName () |
Each connection from a remote is represented by a class implementing this interface. MenuManagerServer holds a series of ServerConnectionManager objects, that in turn contain a series of these connections. Running connections are managed by MenuManagerServer where it will deal with heartbeating, bootstrapping, incoming updates and sending local updates to the remote.
void com.thecoderscorner.menu.mgr.ServerConnection.closeConnection | ( | ) |
close the current connection if it is open
Implemented in com.thecoderscorner.menu.remote.mgrclient.SocketServerConnection.
ServerConnectionMode com.thecoderscorner.menu.mgr.ServerConnection.getConnectionMode | ( | ) |
Implemented in com.thecoderscorner.menu.remote.mgrclient.SocketServerConnection.
int com.thecoderscorner.menu.mgr.ServerConnection.getHeartbeatFrequency | ( | ) |
Implemented in com.thecoderscorner.menu.remote.mgrclient.SocketServerConnection.
String com.thecoderscorner.menu.mgr.ServerConnection.getUserName | ( | ) |
get the username of this connection
Implements com.thecoderscorner.menu.remote.RemoteDevice.
Implemented in com.thecoderscorner.menu.remote.mgrclient.SocketServerConnection.
long com.thecoderscorner.menu.mgr.ServerConnection.lastReceivedHeartbeat | ( | ) |
Implemented in com.thecoderscorner.menu.remote.mgrclient.SocketServerConnection.
long com.thecoderscorner.menu.mgr.ServerConnection.lastTransmittedHeartbeat | ( | ) |
Implemented in com.thecoderscorner.menu.remote.mgrclient.SocketServerConnection.
void com.thecoderscorner.menu.mgr.ServerConnection.registerConnectionListener | ( | BiConsumer< ServerConnection, Boolean > | connectionListener | ) |
Register the connection listener to this connection that will receive udpates on connection changes.
connectionListener | the connection state |
Implemented in com.thecoderscorner.menu.remote.mgrclient.SocketServerConnection.
void com.thecoderscorner.menu.mgr.ServerConnection.registerMessageHandler | ( | BiConsumer< ServerConnection, MenuCommand > | messageHandler | ) |
Register the message handler that will receive all messages from the connection
messageHandler | the message handler |
Implemented in com.thecoderscorner.menu.remote.mgrclient.SocketServerConnection.
void com.thecoderscorner.menu.mgr.ServerConnection.sendCommand | ( | MenuCommand | command | ) |
Send a command to the remote
command | the command to send |
Implemented in com.thecoderscorner.menu.remote.mgrclient.SocketServerConnection.
void com.thecoderscorner.menu.mgr.ServerConnection.setConnectionMode | ( | ServerConnectionMode | mode | ) |
Set the connection mode for this connection, usually called by the menu manager to indicate state
mode | the mode |
Implemented in com.thecoderscorner.menu.remote.mgrclient.SocketServerConnection.