Package io.servicetalk.transport.api
Interface ExecutionContext<ES extends ExecutionStrategy>
- Type Parameters:
ES- The type of Execution Strategy used.
- All Known Subinterfaces:
GrpcExecutionContext,HttpExecutionContext
- All Known Implementing Classes:
DefaultExecutionContext,DefaultHttpExecutionContext,DelegatingExecutionContext,DelegatingHttpExecutionContext
public interface ExecutionContext<ES extends ExecutionStrategy>
Context related to execution and allocation.
-
Method Summary
Modifier and TypeMethodDescriptionReturn theBufferAllocatorthat can be used to allocateBuffers if needed.Returns theExecutionStrategyassociated with this context.executor()Get theExecutorthat is used to create any asynchronous sources.Get theIoExecutorthat is used to handle network transport I/O operations.
-
Method Details
-
bufferAllocator
BufferAllocator bufferAllocator()Return theBufferAllocatorthat can be used to allocateBuffers if needed.- Returns:
- the
BufferAllocatorto use for allocatingBuffers.
-
ioExecutor
IoExecutor ioExecutor()Get theIoExecutorthat is used to handle network transport I/O operations.- Returns:
- The
IoExecutorthat is used to handle network transport I/O operations.
-
executor
Executor executor()Get theExecutorthat is used to create any asynchronous sources.- Returns:
- The
Executorthat is used to create any asynchronous sources.
-
executionStrategy
ES executionStrategy()Returns theExecutionStrategyassociated with this context.- Returns:
- The
ExecutionStrategyassociated with this context.
-