@BetaApi
public interface TransportProvider
| Modifier and Type | Method and Description |
|---|---|
Transport |
getTransport()
Provides a Transport, which could either be a new instance for every call, or the same
instance, depending on the implementation.
|
Transport |
getTransport(ScheduledExecutorService executor)
Provides a Transport, which could either be a new instance for every call, or the same
instance, depending on the implementation.
|
String |
getTransportName()
The name of the transport.
|
boolean |
needsExecutor()
True if the Transport needs an executor.
|
boolean needsExecutor()
Transport getTransport() throws IOException
This method should only be called if needsExecutor() returns false.
IOExceptionTransport getTransport(ScheduledExecutorService executor) throws IOException
This method should only be called if needsExecutor() returns true.
IOExceptionString getTransportName()
This string can be used for identifying transports for switching logic.