Package io.servicetalk.transport.api
Class DelegatingExecutionContext<ES extends ExecutionStrategy>
java.lang.Object
io.servicetalk.transport.api.DelegatingExecutionContext<ES>
- Type Parameters:
ES
- type of the execution strategy used.
- All Implemented Interfaces:
ExecutionContext<ES>
public class DelegatingExecutionContext<ES extends ExecutionStrategy>
extends Object
implements ExecutionContext<ES>
An
ExecutionContext
implementation that delegates all calls to a provided ExecutionContext
. Any of
the methods can be overridden by implementations to change the behavior.-
Constructor Summary
ConstructorsConstructorDescriptionDelegatingExecutionContext
(ExecutionContext<? extends ES> delegate) New instance. -
Method Summary
Modifier and TypeMethodDescriptionReturn theBufferAllocator
that can be used to allocateBuffer
s if needed.protected final ExecutionContext<? extends ES>
delegate()
Get theExecutionContext
that this class delegates to.Returns theExecutionStrategy
associated with this context.executor()
Get theExecutor
that is used to create any asynchronous sources.Get theIoExecutor
that is used to handle the I/O.
-
Constructor Details
-
DelegatingExecutionContext
New instance.- Parameters:
delegate
-ExecutionContext
to delegate all calls.
-
-
Method Details
-
delegate
Get theExecutionContext
that this class delegates to.- Returns:
- the
ExecutionContext
that this class delegates to.
-
bufferAllocator
Description copied from interface:ExecutionContext
Return theBufferAllocator
that can be used to allocateBuffer
s if needed.- Specified by:
bufferAllocator
in interfaceExecutionContext<ES extends ExecutionStrategy>
- Returns:
- the
BufferAllocator
to use for allocatingBuffer
s.
-
ioExecutor
Description copied from interface:ExecutionContext
Get theIoExecutor
that is used to handle the I/O.- Specified by:
ioExecutor
in interfaceExecutionContext<ES extends ExecutionStrategy>
- Returns:
- The
IoExecutor
that is used to handle the I/O.
-
executor
Description copied from interface:ExecutionContext
Get theExecutor
that is used to create any asynchronous sources.- Specified by:
executor
in interfaceExecutionContext<ES extends ExecutionStrategy>
- Returns:
- The
Executor
that is used to create any asynchronous sources.
-
executionStrategy
Description copied from interface:ExecutionContext
Returns theExecutionStrategy
associated with this context.- Specified by:
executionStrategy
in interfaceExecutionContext<ES extends ExecutionStrategy>
- Returns:
- The
ExecutionStrategy
associated with this context.
-