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
AnExecutionContextimplementation 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 BufferAllocatorbufferAllocator()Return theBufferAllocatorthat can be used to allocateBuffers if needed.protected ExecutionContextdelegate()Get theExecutionContextthat this class delegates to.ExecutionStrategyexecutionStrategy()Returns theExecutionStrategyassociated with this context.Executorexecutor()Get theExecutorthat is used to create any asynchronous sources.IoExecutorioExecutor()Get theIoExecutorthat is used to handle the IO.
-
-
-
Constructor Detail
-
DelegatingExecutionContext
public DelegatingExecutionContext(ExecutionContext delegate)
New instance.- Parameters:
delegate-ExecutionContextto delegate all calls.
-
-
Method Detail
-
delegate
protected final ExecutionContext delegate()
Get theExecutionContextthat this class delegates to.- Returns:
- the
ExecutionContextthat this class delegates to.
-
bufferAllocator
public BufferAllocator bufferAllocator()
Description copied from interface:ExecutionContextReturn theBufferAllocatorthat can be used to allocateBuffers if needed.- Specified by:
bufferAllocatorin interfaceExecutionContext- Returns:
- the
BufferAllocatorto use
-
ioExecutor
public IoExecutor ioExecutor()
Description copied from interface:ExecutionContextGet theIoExecutorthat is used to handle the IO.- Specified by:
ioExecutorin interfaceExecutionContext- Returns:
- The
IoExecutorthat is used to handle the.
-
executor
public Executor executor()
Description copied from interface:ExecutionContextGet theExecutorthat is used to create any asynchronous sources.- Specified by:
executorin interfaceExecutionContext- Returns:
- The
Executorthat is used to create any asynchronous sources.
-
executionStrategy
public ExecutionStrategy executionStrategy()
Description copied from interface:ExecutionContextReturns theExecutionStrategyassociated with this context.- Specified by:
executionStrategyin interfaceExecutionContext- Returns:
- The
ExecutionStrategyassociated with this context.
-
-