public class RemoteMenuController extends Object
| Constructor | Description |
|---|---|
RemoteMenuController(RemoteConnector connector,
MenuTree managedMenu,
ScheduledExecutorService executor,
String localName,
java.time.Clock clock,
int heartbeatFrequency) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addListener(RemoteControllerListener listener) |
register for events when the tree becomes fully populated, a menu item changes
or there's a change in connectivity.
|
RemoteConnector |
getConnector() |
get the underlying connectivity, rarely needed
|
RemoteInformation |
getRemotePartyInfo() |
get the name of the device that we've connected to.
|
boolean |
isTreeFullyPopulated() |
Check if all the menu items from the remote device are available locally yet.
|
void |
sendCommand(MenuCommand command) |
send a command to the Arduino, normally use the CommandFactory to generate the command
|
void |
start() |
starts the remote connection such that it will attempt to establish connectivity
|
void |
stop() |
attempt to stop the underlying connector
|
public RemoteMenuController(RemoteConnector connector, MenuTree managedMenu, ScheduledExecutorService executor, String localName, java.time.Clock clock, int heartbeatFrequency)
public void start()
public void stop()
public void sendCommand(MenuCommand command)
command - a command to send to the remote side.public RemoteInformation getRemotePartyInfo()
public RemoteConnector getConnector()
public boolean isTreeFullyPopulated()
public void addListener(RemoteControllerListener listener)
listener - your listener to register for eventsCopyright © 2018. All rights reserved.