Package io.servicetalk.transport.api
Class DelegatingExecutionContext
- java.lang.Object
-
- io.servicetalk.transport.api.DelegatingExecutionContext
-
- All Implemented Interfaces:
ExecutionContext
public class DelegatingExecutionContext extends java.lang.Object implements ExecutionContext
AnExecutionContext
implementation that delegates all calls to a providedExecutionContext
. Any of the methods can be overridden by implementations to change the behavior.
-
-
Constructor Summary
Constructors Constructor Description DelegatingExecutionContext(ExecutionContext delegate)
New instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BufferAllocator
bufferAllocator()
Return theBufferAllocator
that can be used to allocateBuffer
s if needed.protected ExecutionContext
delegate()
Get theExecutionContext
that this class delegates to.ExecutionStrategy
executionStrategy()
Returns theExecutionStrategy
associated with this context.Executor
executor()
Get theExecutor
that is used to create any asynchronous sources.IoExecutor
ioExecutor()
Get theIoExecutor
that is used to handle the IO.
-
-
-
Constructor Detail
-
DelegatingExecutionContext
public DelegatingExecutionContext(ExecutionContext delegate)
New instance.- Parameters:
delegate
-ExecutionContext
to delegate all calls.
-
-
Method Detail
-
delegate
protected final ExecutionContext delegate()
Get theExecutionContext
that this class delegates to.- Returns:
- the
ExecutionContext
that this class delegates to.
-
bufferAllocator
public BufferAllocator bufferAllocator()
Description copied from interface:ExecutionContext
Return theBufferAllocator
that can be used to allocateBuffer
s if needed.- Specified by:
bufferAllocator
in interfaceExecutionContext
- Returns:
- the
BufferAllocator
to use
-
ioExecutor
public IoExecutor ioExecutor()
Description copied from interface:ExecutionContext
Get theIoExecutor
that is used to handle the IO.- Specified by:
ioExecutor
in interfaceExecutionContext
- Returns:
- The
IoExecutor
that is used to handle the.
-
executor
public Executor executor()
Description copied from interface:ExecutionContext
Get theExecutor
that is used to create any asynchronous sources.- Specified by:
executor
in interfaceExecutionContext
- Returns:
- The
Executor
that is used to create any asynchronous sources.
-
executionStrategy
public ExecutionStrategy executionStrategy()
Description copied from interface:ExecutionContext
Returns theExecutionStrategy
associated with this context.- Specified by:
executionStrategy
in interfaceExecutionContext
- Returns:
- The
ExecutionStrategy
associated with this context.
-
-