Package io.servicetalk.client.api
Class DelegatingConnectionFactoryFilter<ResolvedAddress,C extends ListenableAsyncCloseable>
java.lang.Object
io.servicetalk.client.api.DelegatingConnectionFactoryFilter<ResolvedAddress,C>
- Type Parameters:
ResolvedAddress
- The type of a resolved address that can be used for connecting.C
- The type of connections created by this factory.
- All Implemented Interfaces:
ConnectionFactoryFilter<ResolvedAddress,
,C> ExecutionStrategyInfluencer<ExecutionStrategy>
public class DelegatingConnectionFactoryFilter<ResolvedAddress,C extends ListenableAsyncCloseable>
extends Object
implements ConnectionFactoryFilter<ResolvedAddress,C>
A
ConnectionFactoryFilter
that delegates all methods to another ConnectionFactoryFilter
.-
Constructor Summary
ConstructorDescriptionCreate a new instance. -
Method Summary
Modifier and TypeMethodDescriptioncreate
(ConnectionFactory<ResolvedAddress, C> original) Decorates the passedoriginal
ConnectionFactory
to add the filtering logic.protected final ConnectionFactoryFilter<ResolvedAddress,
C> delegate()
Returns theConnectionFactoryFilter
delegate.Return anExecutionStrategy
that describes the offloads required by the influencer.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.servicetalk.client.api.ConnectionFactoryFilter
append
-
Constructor Details
-
DelegatingConnectionFactoryFilter
Create a new instance.- Parameters:
delegate
-ConnectionFactory
to which all methods are delegated.
-
-
Method Details
-
create
Description copied from interface:ConnectionFactoryFilter
Decorates the passedoriginal
ConnectionFactory
to add the filtering logic.- Specified by:
create
in interfaceConnectionFactoryFilter<ResolvedAddress,
C extends ListenableAsyncCloseable> - Parameters:
original
-ConnectionFactory
to filter.- Returns:
- Decorated
ConnectionFactory
that contains the filtering logic.
-
requiredOffloads
Description copied from interface:ConnectionFactoryFilter
Return anExecutionStrategy
that describes the offloads required by the influencer.If the returned strategy extends
ConnectExecutionStrategy
then the connection creation or accept may be offloaded.If the returned strategy extends
HttpExecutionStrategy
then the HTTP execution strategy will be applied to the connections created.A utility class provides the ability to combine connect and HTTP execution strategies,
io.servicetalk.http.api.ConnectAndHttpExecutionStrategy
.- Specified by:
requiredOffloads
in interfaceConnectionFactoryFilter<ResolvedAddress,
C extends ListenableAsyncCloseable> - Specified by:
requiredOffloads
in interfaceExecutionStrategyInfluencer<ResolvedAddress>
- Returns:
- the
ExecutionStrategy
required by the influencer.
-
delegate
Returns theConnectionFactoryFilter
delegate.- Returns:
- Delegate
ConnectionFactoryFilter
.
-