-
public class RemoteServerManages a tiny WebSocket server that can receive model data and viewer settings. Client apps can call acquireReceivedMessage to check for new data and pop it off the small internal queue.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classRemoteServer.ReceivedMessageEncapsulates a message sent from the web client.
-
Constructor Summary
Constructors Constructor Description RemoteServer(int port)
-
Method Summary
Modifier and Type Method Description StringpeekIncomingLabel()Checks if a download is currently in progress and returns its label.Returns null if nothing is being downloaded. static booleanisJson(@Nullable() String label)Checks if a peeked message has JSON content. static booleanisBinary(@Nullable() String label)Checks if a peeked message has binary content. RemoteServer.ReceivedMessageacquireReceivedMessage()Pops a message off the incoming queue or returns null if there are no unread messages. voidclose()-
-
Method Detail
-
peekIncomingLabel
@Nullable() String peekIncomingLabel()
Checks if a download is currently in progress and returns its label.Returns null if nothing is being downloaded.
-
isBinary
static boolean isBinary(@Nullable() String label)
Checks if a peeked message has binary content.
-
acquireReceivedMessage
@Nullable() RemoteServer.ReceivedMessage acquireReceivedMessage()
Pops a message off the incoming queue or returns null if there are no unread messages.
-
close
void close()
-
-
-
-