Package 

Class RemoteServer


  • 
    public class RemoteServer
    
                        

    Manages 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 class RemoteServer.ReceivedMessage

      Encapsulates a message sent from the web client.

    • Constructor Summary

      Constructors 
      Constructor Description
      RemoteServer(int port)
    • Method Summary

      Modifier and Type Method Description
      String peekIncomingLabel() Checks if a download is currently in progress and returns its label.Returns null if nothing is being downloaded.
      static boolean isJson(@Nullable() String label) Checks if a peeked message has JSON content.
      static boolean isBinary(@Nullable() String label) Checks if a peeked message has binary content.
      RemoteServer.ReceivedMessage acquireReceivedMessage() Pops a message off the incoming queue or returns null if there are no unread messages.
      void close()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait