Class ProtobufServer

  • All Implemented Interfaces:
    java.lang.Runnable

    public class ProtobufServer
    extends java.lang.Object
    implements java.lang.Runnable
    • Constructor Summary

      Constructors 
      Constructor Description
      ProtobufServer​(int listenPort, RobotConnections robotConnections, java.util.function.Consumer<java.net.Socket> onNewConnection)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void run()  
      void send_to_robot​(long robot_id, ProtobufMessage msg)  
      <T extends com.google.protobuf.GeneratedMessageV3>
      void
      send_to_robot​(long robot_id, T msg)  
      void start()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ProtobufServer

        public ProtobufServer​(int listenPort,
                              RobotConnections robotConnections,
                              java.util.function.Consumer<java.net.Socket> onNewConnection)
    • Method Detail

      • start

        public void start()
                   throws java.io.IOException
        Throws:
        java.io.IOException
      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
      • send_to_robot

        public void send_to_robot​(long robot_id,
                                  ProtobufMessage msg)
      • send_to_robot

        public <T extends com.google.protobuf.GeneratedMessageV3> void send_to_robot​(long robot_id,
                                                                                     T msg)