Package com.linecorp.armeria.client
Interface ClientRequestContextCaptor
- All Superinterfaces:
AutoCloseable
,SafeCloseable
,Supplier<ClientRequestContext>
Captures the
ClientRequestContext
s created by the current thread.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionget()
Returns theClientRequestContext
captured first.getAll()
Returns allClientRequestContext
s captured so far.Returns theClientRequestContext
captured first, ornull
if unavailable.default boolean
isEmpty()
Returns whether aClientRequestContext
was captured so far.int
size()
Returns the number ofClientRequestContext
captured so far.Methods inherited from interface com.linecorp.armeria.common.util.SafeCloseable
close
-
Method Details
-
get
ClientRequestContext get()Returns theClientRequestContext
captured first.- Specified by:
get
in interfaceSupplier<ClientRequestContext>
- Throws:
NoSuchElementException
- if noClientRequestContext
was captured so far.
-
getOrNull
Returns theClientRequestContext
captured first, ornull
if unavailable. -
getAll
List<ClientRequestContext> getAll()Returns allClientRequestContext
s captured so far. An empty list is returned if noClientRequestContext
was captured so far. -
size
int size()Returns the number ofClientRequestContext
captured so far. -
isEmpty
default boolean isEmpty()Returns whether aClientRequestContext
was captured so far.
-