Class DoipServer


  • public class DoipServer
    extends java.lang.Object
    A DOIP server. It is constructed via a DoipServerConfig and a DoipProcessor which determines request-handling logic. The DoipProcessor can be automatically instantiated and managed if not provided to the server on construction in which case the DoipServerConfig must specify the class name of the DoipProcessor. The DOIP server will set up a listener according to the DoipServerConfig, and when requests come in, will pass them to the DoipProcessor to populate the response.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getPort()  
      void init()
      Initializes the server listener and thread pool and begins serving requests.
      void shutdown()
      Shuts down the server listener and thread pool.
      • Methods inherited from class java.lang.Object

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

      • init

        public void init()
                  throws java.lang.Exception
        Initializes the server listener and thread pool and begins serving requests. If the DoipProcessor was not provided at construction, it will be instantiated and initialized.
        Throws:
        java.lang.Exception
      • getPort

        public int getPort()
      • shutdown

        public void shutdown()
        Shuts down the server listener and thread pool. If the DoipProcessor was not provided at construction but was instead instantiated by init(), it will be shut down here.
        Throws:
        java.lang.Exception