public class ExpansionServer
extends java.lang.Object
implements java.lang.AutoCloseable
gRPC Server
for an ExpansionService.Modifier and Type | Method and Description |
---|---|
void |
close() |
static ExpansionServer |
create(ExpansionService service,
java.lang.String host,
int port)
Create a
ExpansionServer for the provided ExpansionService running on an arbitrary
port. |
java.lang.String |
getHost()
Get the host that this
ExpansionServer is bound to. |
int |
getPort()
Get the port that this
ExpansionServer is bound to. |
public static ExpansionServer create(ExpansionService service, java.lang.String host, int port) throws java.io.IOException
ExpansionServer
for the provided ExpansionService running on an arbitrary
port.
If port is 0, a free port will be assigned.
java.io.IOException
public java.lang.String getHost()
ExpansionServer
is bound to.public int getPort()
ExpansionServer
is bound to.public void close() throws java.lang.Exception
close
in interface java.lang.AutoCloseable
java.lang.Exception