Package io.servicetalk.http.api
Class DefaultHttpExecutionContext
- java.lang.Object
-
- io.servicetalk.http.api.DefaultHttpExecutionContext
-
- All Implemented Interfaces:
HttpExecutionContext
,ExecutionContext
public final class DefaultHttpExecutionContext extends java.lang.Object implements HttpExecutionContext
Default implementation ofHttpExecutionContext
.
-
-
Constructor Summary
Constructors Constructor Description DefaultHttpExecutionContext(BufferAllocator bufferAllocator, IoExecutor ioExecutor, Executor executor, HttpExecutionStrategy 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.HttpExecutionStrategy
executionStrategy()
Returns theHttpExecutionStrategy
associated with this context.Executor
executor()
Get theExecutor
that is used to create any asynchronous sources.IoExecutor
ioExecutor()
Get theIoExecutor
that is used to handle the IO.
-
-
-
Constructor Detail
-
DefaultHttpExecutionContext
public DefaultHttpExecutionContext(BufferAllocator bufferAllocator, IoExecutor ioExecutor, Executor executor, HttpExecutionStrategy executionStrategy)
Create a new instance.- Parameters:
bufferAllocator
- TheBufferAllocator
to use forbufferAllocator()
.ioExecutor
- TheIoExecutor
to use forioExecutor()
.executor
- TheExecutor
to use forexecutor()
.executionStrategy
-HttpExecutionStrategy
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 HttpExecutionStrategy executionStrategy()
Description copied from interface:HttpExecutionContext
Returns theHttpExecutionStrategy
associated with this context.- Specified by:
executionStrategy
in interfaceExecutionContext
- Specified by:
executionStrategy
in interfaceHttpExecutionContext
- Returns:
- The
HttpExecutionStrategy
associated with this context.
-
-