| Package | Description |
|---|---|
| com.linecorp.armeria.client |
Client core.
|
| com.linecorp.armeria.common |
Common types.
|
| com.linecorp.armeria.common.logging | |
| com.linecorp.armeria.internal.common |
Various classes used internally.
|
| com.linecorp.armeria.internal.common.metric |
Various classes used internally.
|
| com.linecorp.armeria.internal.logging | |
| com.linecorp.armeria.server |
Server core.
|
| Modifier and Type | Interface and Description |
|---|---|
interface |
ClientRequestContext
|
| Modifier and Type | Class and Description |
|---|---|
class |
ClientRequestContextWrapper
Wraps an existing
ClientRequestContext. |
class |
DefaultClientRequestContext
Default
ClientRequestContext implementation. |
| Modifier and Type | Class and Description |
|---|---|
class |
RequestContextWrapper<T extends RequestContext>
Wraps an existing
RequestContext. |
| Modifier and Type | Class and Description |
|---|---|
class |
NonWrappingRequestContext
A skeletal
RequestContext implementation that helps to implement a non-wrapping
RequestContext. |
class |
RequestContextWrapper<T extends RequestContext>
Wraps an existing
RequestContext. |
| Modifier and Type | Method and Description |
|---|---|
static <T extends RequestContext> |
RequestContext.current()
Returns the context of the
Request that is being handled in the current thread. |
static <T extends RequestContext> |
RequestContext.currentOrNull()
Returns the context of the
Request that is being handled in the current thread. |
| Modifier and Type | Method and Description |
|---|---|
RequestContext |
RequestContext.newDerivedContext(RequestId id,
HttpRequest req,
RpcRequest rpcReq)
Creates a new
RequestContext whose properties and attrs() are copied from this
RequestContext, except having a different pair of HttpRequest and RpcRequest
and its own RequestLog. |
| Modifier and Type | Method and Description |
|---|---|
static SafeCloseable |
RequestContext.push(RequestContext ctx)
Deprecated.
Use
push(). |
static SafeCloseable |
RequestContext.push(RequestContext ctx,
boolean runCallbacks)
Deprecated.
Use
push(). |
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
RequestContext.mapCurrent(Function<? super RequestContext,T> mapper,
Supplier<T> defaultValueSupplier)
Maps the context of the
Request that is being handled in the current thread. |
| Constructor and Description |
|---|
NonWrappingRequestContext(MeterRegistry meterRegistry,
SessionProtocol sessionProtocol,
RequestId id,
HttpMethod method,
String path,
String query,
HttpRequest req,
RpcRequest rpcReq,
RequestContext rootAttributeMap)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
RequestContext |
RequestLogAccess.context()
Returns the
RequestContext associated with the Request being handled. |
| Modifier and Type | Method and Description |
|---|---|
static RequestLogBuilder |
RequestLog.builder(RequestContext ctx)
Returns a newly created
RequestLogBuilder. |
Map<String,String> |
RequestContextExporter.export(RequestContext ctx)
Returns a
Map whose key is an export key set through add*() in
RequestContextExporterBuilder and value is extracted from the specified RequestContext. |
ContentPreviewer |
ContentPreviewerFactory.requestContentPreviewer(RequestContext ctx,
RequestHeaders headers)
|
ContentPreviewer |
ContentPreviewerFactory.responseContentPreviewer(RequestContext ctx,
ResponseHeaders resHeaders)
Returns a newly-created response
ContentPreviewer with the given RequestContext and
ResponseHeaders. |
| Modifier and Type | Method and Description |
|---|---|
ContentPreviewerFactoryBuilder |
ContentPreviewerFactoryBuilder.binary(BiFunction<? super HttpHeaders,? super io.netty.buffer.ByteBuf,String> producer,
BiPredicate<? super RequestContext,? super HttpHeaders> predicate)
Sets the specified
BiPredicate to produce the preview using the specified
BiFunction when the predicate returns true. |
ContentPreviewerFactoryBuilder |
ContentPreviewerFactoryBuilder.binary(BiPredicate<? super RequestContext,? super HttpHeaders> predicate)
|
ContentPreviewerFactoryBuilder |
ContentPreviewerFactoryBuilder.disable(BiPredicate<? super RequestContext,? super HttpHeaders> predicate)
Sets the specified
BiPredicate NOT to produce the preview when the predicate
returns true. |
ContentPreviewerFactoryBuilder |
ContentPreviewerFactoryBuilder.text(BiPredicate<? super RequestContext,? super HttpHeaders> predicate)
Sets the specified
BiPredicate to produce the text preview when the predicate
returns true. |
| Modifier and Type | Method and Description |
|---|---|
static <T extends RequestContext> |
RequestContextThreadLocal.get()
Returns the current
RequestContext in the thread-local. |
static <T extends RequestContext> |
RequestContextThreadLocal.getAndRemove()
Removes the
RequestContext in the thread-local and returns it. |
static <T extends RequestContext> |
RequestContextThreadLocal.getAndSet(RequestContext ctx)
Sets the specified
RequestContext in the thread-local and returns the old RequestContext. |
| Modifier and Type | Method and Description |
|---|---|
protected RequestContext |
AbstractRequestContextAwareFuture.ctx() |
| Modifier and Type | Method and Description |
|---|---|
static <T extends RequestContext> |
RequestContextThreadLocal.getAndSet(RequestContext ctx)
Sets the specified
RequestContext in the thread-local and returns the old RequestContext. |
static IllegalStateException |
RequestContextUtil.newIllegalContextPushingException(RequestContext newCtx,
RequestContext oldCtx)
Returns an
IllegalStateException which is raised when pushing a context from
the unexpected thread or forgetting to close the previous context. |
<T> CompletableFuture<T> |
JavaVersionSpecific.newRequestContextAwareFuture(RequestContext ctx)
Returns a
CompletableFuture which executes all callbacks with the RequestContext. |
static void |
RequestContextThreadLocal.set(RequestContext ctx)
Sets the specified
RequestContext in the thread-local. |
| Constructor and Description |
|---|
AbstractRequestContextAwareFuture(RequestContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
static void |
RequestMetricSupport.setup(RequestContext ctx,
io.netty.util.AttributeKey<Boolean> requestMetricsSetKey,
MeterIdPrefixFunction meterIdPrefixFunction,
boolean server)
Sets up request metrics.
|
| Modifier and Type | Method and Description |
|---|---|
static HttpRequest |
ContentPreviewingUtil.setUpRequestContentPreviewer(RequestContext ctx,
HttpRequest req,
ContentPreviewer requestContentPreviewer)
Sets up the request
ContentPreviewer to set
RequestLogBuilder.requestContentPreview(String) when the preview is available. |
static HttpResponse |
ContentPreviewingUtil.setUpResponseContentPreviewer(ContentPreviewerFactory factory,
RequestContext ctx,
HttpResponse res)
Sets up the response
ContentPreviewer to set
RequestLogBuilder.responseContentPreview(String) when the preview is available. |
| Modifier and Type | Interface and Description |
|---|---|
interface |
ServiceRequestContext
Provides information about an invocation and related utilities.
|
| Modifier and Type | Class and Description |
|---|---|
class |
DefaultServiceRequestContext
Default
ServiceRequestContext implementation. |
class |
ServiceRequestContextWrapper
Wraps an existing
ServiceRequestContext. |
Copyright © 2020 LeanCloud. All rights reserved.