ResolvedAddress - The type of a resolved address that can be used for connecting.C - The type of connections created by this factory.public interface ConnectionFactory<ResolvedAddress,C extends ListenableAsyncCloseable>
extends ListenableAsyncCloseable
ConnectionFactoryFilter| Modifier and Type | Method and Description |
|---|---|
default Single<C> |
newConnection(ResolvedAddress address,
ContextMap context,
TransportObserver observer)
Creates and asynchronously returns a connection.
|
default Single<C> |
newConnection(ResolvedAddress address,
TransportObserver observer)
Deprecated.
|
@Deprecated default Single<C> newConnection(ResolvedAddress address, @Nullable TransportObserver observer)
newConnection(Object, ContextMap, TransportObserver).address - to connect.observer - TransportObserver for the newly created connection.Single that emits the created connection.default Single<C> newConnection(ResolvedAddress address, @Nullable ContextMap context, @Nullable TransportObserver observer)
address - to connect.context - context of the caller (e.g. request context) or null if no context
provided. null context may also mean that a connection is created outside the normal request processing
(e.g. health-checking).observer - TransportObserver for the newly created connection or null if no observer
provided.Single that emits the created connection.