Package io.grpc.internal
Interface ServerTransport
-
- All Superinterfaces:
InternalInstrumented<InternalChannelz.SocketStats>
,InternalWithLogId
- All Known Implementing Classes:
InProcessTransport
,NettyServerTransport
,ServletServerBuilder.ServerTransportImpl
,ServletServerBuilder.ServerTransportImpl
public interface ServerTransport extends InternalInstrumented<InternalChannelz.SocketStats>
An inbound connection.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.concurrent.ScheduledExecutorService
getScheduledExecutorService()
Returns an executor for scheduling provided by the transport.void
shutdown()
Initiates an orderly shutdown of the transport.void
shutdownNow(Status reason)
Initiates a forceful shutdown in which preexisting and new calls are closed.-
Methods inherited from interface io.grpc.InternalInstrumented
getStats
-
Methods inherited from interface io.grpc.InternalWithLogId
getLogId
-
-
-
-
Method Detail
-
shutdown
void shutdown()
Initiates an orderly shutdown of the transport. Existing streams continue, but new streams will eventually begin failing. New streams "eventually" begin failing because shutdown may need to be processed on a separate thread. May only be called once.
-
shutdownNow
void shutdownNow(Status reason)
Initiates a forceful shutdown in which preexisting and new calls are closed. Existing calls should be closed with the providedreason
.
-
getScheduledExecutorService
java.util.concurrent.ScheduledExecutorService getScheduledExecutorService()
Returns an executor for scheduling provided by the transport. The service should be configured to allow cancelled scheduled runnables to be GCed.The executor may not be used after the transport terminates. The caller should ensure any outstanding tasks are cancelled when the transport terminates.
-
-