Interface ServerTransport

All Superinterfaces:
InternalInstrumented<InternalChannelz.SocketStats>, InternalWithLogId

public interface ServerTransport extends InternalInstrumented<InternalChannelz.SocketStats>
An inbound connection.
  • Method Details

    • 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 provided reason.
    • getScheduledExecutorService

      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.