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 BufferAllocatorbufferAllocator()Return theBufferAllocatorthat can be used to allocateBuffers if needed.booleanequals(java.lang.Object o)ExecutionStrategyexecutionStrategy()Returns theExecutionStrategyassociated with this context.Executorexecutor()Get theExecutorthat is used to create any asynchronous sources.inthashCode()IoExecutorioExecutor()Get theIoExecutorthat 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- TheBufferAllocatorto use forbufferAllocator().ioExecutor- TheIoExecutorto use forioExecutor().executor- TheExecutorto use forexecutor().executionStrategy-ExecutionStrategyto use forexecutionStrategy().
-
-
Method Detail
-
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.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-