public interface RequestManager
RequestStartedEvent
and
RequestEndedEvent
.Modifier and Type | Method and Description |
---|---|
<T,E extends Exception> |
doAsRequest(RequestCallback<T,E> callback,
RequestInfoProvider requestInfoProvider)
Sets up and tears down all logic for processing requests.
|
RequestContext |
getRequestContext() |
String |
getRequestId() |
RequestMetadata |
getRequestMetadata() |
@Nullable <T,E extends Exception> T doAsRequest(@Nonnull RequestCallback<T,E> callback, @Nonnull RequestInfoProvider requestInfoProvider) throws E extends Exception
T
- type of the requestE
- type of exceptioncallback
- called after the RequestStartedEvent
has been published.requestInfoProvider
- provides request details such as sessionId, remoteAddress that are used to
set up logging.E
- when RequestCallback.withRequest(RequestContext)
throws an exception.E extends Exception
@Nullable RequestContext getRequestContext()
null
if there is no current request, for instance
when running a task in a background thread.@Nullable String getRequestId()
null
if there is no
current request, for instance when running a task in a background thread.RequestContext.getId()
@Nullable RequestMetadata getRequestMetadata()
null
if there is no current request.Copyright © 2019 Atlassian. All rights reserved.