Class ServletServerBuilder.InternalServerImpl
java.lang.Object
io.grpc.servlet.ServletServerBuilder.InternalServerImpl
- All Implemented Interfaces:
InternalServer
- Enclosing class:
ServletServerBuilder
private static final class ServletServerBuilder.InternalServerImpl
extends Object
implements InternalServer
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the first listening socket address.List<? extends SocketAddress> Returns a list of listening socket addresses.Returns the first listen socket stats of this server.Returns a list of listen socket stats of this server.voidshutdown()Initiates an orderly shutdown of the server.voidstart(ServerListener listener) Starts transport.
-
Field Details
-
serverListener
ServerListener serverListener
-
-
Constructor Details
-
InternalServerImpl
InternalServerImpl()
-
-
Method Details
-
start
Description copied from interface:InternalServerStarts transport. Implementations must not calllisteneruntil afterstart()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.- Specified by:
startin interfaceInternalServer- Parameters:
listener- non-nulllistener of server events
-
shutdown
public void shutdown()Description copied from interface:InternalServerInitiates an orderly shutdown of the server. Existing transports continue, but new transports will not be created (onceServerListener.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.- Specified by:
shutdownin interfaceInternalServer
-
getListenSocketAddress
Description copied from interface:InternalServerReturns the first listening socket address. May change afterInternalServer.start(ServerListener)is called.- Specified by:
getListenSocketAddressin interfaceInternalServer
-
getListenSocketStats
Description copied from interface:InternalServerReturns the first listen socket stats of this server. May returnnull.- Specified by:
getListenSocketStatsin interfaceInternalServer
-
getListenSocketAddresses
Description copied from interface:InternalServerReturns a list of listening socket addresses. May change afterInternalServer.start(ServerListener)is called.- Specified by:
getListenSocketAddressesin interfaceInternalServer
-
getListenSocketStatsList
@Nullable public List<InternalInstrumented<InternalChannelz.SocketStats>> getListenSocketStatsList()Description copied from interface:InternalServerReturns a list of listen socket stats of this server. May returnnull.- Specified by:
getListenSocketStatsListin interfaceInternalServer
-