Class ExpansionServer

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    public class ExpansionServer
    extends java.lang.Object
    implements java.lang.AutoCloseable
    A gRPC Server for an ExpansionService.
    • Method Detail

      • create

        public static ExpansionServer create​(ExpansionService service,
                                             java.lang.String host,
                                             int port)
                                      throws java.io.IOException
        Create a ExpansionServer for the provided ExpansionService running on an arbitrary port.

        If port is 0, a free port will be assigned.

        Throws:
        java.io.IOException
      • getHost

        public java.lang.String getHost()
        Get the host that this ExpansionServer is bound to.
      • getPort

        public int getPort()
        Get the port that this ExpansionServer is bound to.
      • close

        public void close()
                   throws java.lang.Exception
        Specified by:
        close in interface java.lang.AutoCloseable
        Throws:
        java.lang.Exception