Package io.servicetalk.transport.api
Class DefaultExecutionContext
- java.lang.Object
-
- io.servicetalk.transport.api.DefaultExecutionContext
-
- All Implemented Interfaces:
ExecutionContext
public final class DefaultExecutionContext extends java.lang.Object implements ExecutionContext
A default implementation ofExecutionContext
.
-
-
Constructor Summary
Constructors Constructor Description DefaultExecutionContext(BufferAllocator bufferAllocator, IoExecutor ioExecutor, Executor executor, ExecutionStrategy executionStrategy)
Create a 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.boolean
equals(java.lang.Object o)
ExecutionStrategy
executionStrategy()
Returns theExecutionStrategy
associated with this context.Executor
executor()
Get theExecutor
that is used to create any asynchronous sources.int
hashCode()
IoExecutor
ioExecutor()
Get theIoExecutor
that is used to handle the IO.
-
-
-
Constructor Detail
-
DefaultExecutionContext
public DefaultExecutionContext(BufferAllocator bufferAllocator, IoExecutor ioExecutor, Executor executor, ExecutionStrategy 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 Detail
-
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.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-