@ThreadSafe public interface InternalServer
accept()
s new connections.Modifier and Type | Method and Description |
---|---|
List<InternalInstrumented<InternalChannelz.SocketStats>> |
getListenSockets()
Returns the listen sockets of this server.
|
int |
getPort()
Returns what underlying port the server is listening on, or -1 if the port number is not
available or does not make sense.
|
void |
shutdown()
Initiates an orderly shutdown of the server.
|
void |
start(ServerListener listener)
Starts transport.
|
void start(ServerListener listener) throws IOException
listener
until after start()
returns. The method only returns after it has done the equivalent of bind()ing, so it will be
able to service any connections created after returning.listener
- non-null
listener of server eventsIOException
- if unable to bindvoid shutdown()
ServerListener.serverShutdown()
callback is called). This
method may only be called once.int getPort()
List<InternalInstrumented<InternalChannelz.SocketStats>> getListenSockets()
Copyright © 2018. All rights reserved.