Package io.servicetalk.transport.api
Class DefaultExecutionContext<ES extends ExecutionStrategy>
java.lang.Object
io.servicetalk.transport.api.DefaultExecutionContext<ES>
- Type Parameters:
ES
- type of the execution strategy used.
- All Implemented Interfaces:
ExecutionContext<ES>
- Direct Known Subclasses:
DefaultHttpExecutionContext
public class DefaultExecutionContext<ES extends ExecutionStrategy>
extends Object
implements ExecutionContext<ES>
A default implementation of
ExecutionContext
.-
Constructor Summary
ConstructorsConstructorDescriptionDefaultExecutionContext
(BufferAllocator bufferAllocator, IoExecutor ioExecutor, Executor executor, ES executionStrategy) Create a new instance. -
Method Summary
Modifier and TypeMethodDescriptionReturn theBufferAllocator
that can be used to allocateBuffer
s if needed.boolean
Returns theExecutionStrategy
associated with this context.executor()
Get theExecutor
that is used to create any asynchronous sources.int
hashCode()
Get theIoExecutor
that is used to handle the I/O.
-
Constructor Details
-
DefaultExecutionContext
public DefaultExecutionContext(BufferAllocator bufferAllocator, IoExecutor ioExecutor, Executor executor, ES executionStrategy) Create a new instance.- Parameters:
bufferAllocator
- TheBufferAllocator
to use forbufferAllocator()
.ioExecutor
- TheIoExecutor
to use forioExecutor()
.executor
- TheExecutor
to use forexecutor()
.executionStrategy
-ExecutionStrategy
to use forexecutionStrategy()
.
-
-
Method Details
-
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.
-
equals
-
hashCode
public int hashCode()
-