com.atlassian.bitbucket.request.RequestManager |
Public Methods
@Nullable
public
T
doAsRequest
(RequestCallback<T, E> callback, RequestInfoProvider requestInfoProvider)
Sets up and tears down all logic for processing requests.
Parameters
callback
| called after the RequestStartedEvent has been published. |
requestInfoProvider
| provides request details such as sessionId, remoteAddress that are used to
set up logging. |
Returns
- the return value of the callback
@Nullable
public
RequestContext
getRequestContext
()
Returns
- the context of the current request. Returns
null
if there is no current request, for instance
when running a task in a background thread.
@Nullable
public
String
getRequestId
()
Returns
- a highly unique (though not guaranteeably unique) request ID. Returns
null
if there is no
current request, for instance when running a task in a background thread.
@Nullable
public
RequestMetadata
getRequestMetadata
()
Returns
- the metadata of the current request. Returns
null
if there is no current request.