Interface ClientTransportFactory

    • Method Detail

      • newClientTransport

        ConnectionClientTransport newClientTransport​(java.net.SocketAddress serverAddress,
                                                     ClientTransportFactory.ClientTransportOptions options,
                                                     ChannelLogger channelLogger)
        Creates an unstarted transport for exclusive use. Ownership of options is passed to the callee; the caller should not reuse or read from the options after this method is called.
        Parameters:
        serverAddress - the address that the transport is connected to
        options - additional configuration
        channelLogger - logger for the transport.
      • 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 should not be used after the factory has been closed. The caller should ensure any outstanding tasks are cancelled before the factory is closed. However, it is a known issue that ClientCallImpl may use this executor after close, so implementations should not go out of their way to prevent usage.

      • getSupportedSocketAddressTypes

        java.util.Collection<java.lang.Class<? extends java.net.SocketAddress>> getSupportedSocketAddressTypes()
        Returns the SocketAddress types this transport supports.