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 theBufferAllocator
that can be used to allocateBuffer
s if needed.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.
-
Method Details
-
bufferAllocator
BufferAllocator bufferAllocator()Return theBufferAllocator
that can be used to allocateBuffer
s if needed.- Returns:
- the
BufferAllocator
to use for allocatingBuffer
s.
-
ioExecutor
IoExecutor ioExecutor()Get theIoExecutor
that is used to handle the I/O.- Returns:
- The
IoExecutor
that is used to handle the I/O.
-
executor
Executor executor()Get theExecutor
that is used to create any asynchronous sources.- Returns:
- The
Executor
that is used to create any asynchronous sources.
-
executionStrategy
ES executionStrategy()Returns theExecutionStrategy
associated with this context.- Returns:
- The
ExecutionStrategy
associated with this context.
-