@ThreadSafe public interface InternalServer
accept()
s new connections.Modifier and Type | Method and Description |
---|---|
SocketAddress |
getListenSocketAddress()
Returns the listening socket address.
|
InternalInstrumented<InternalChannelz.SocketStats> |
getListenSocketStats()
Returns the listen socket stats of this server.
|
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. Blocks until the listening socket(s) have been closed. If
interrupted, this method will not wait for the close to complete, but it will happen
asynchronously.SocketAddress getListenSocketAddress()
start(ServerListener)
is
called.@Nullable InternalInstrumented<InternalChannelz.SocketStats> getListenSocketStats()
null
.Copyright © 2019. All rights reserved.