Interface RequestEventBuilder
- All Known Implementing Classes:
EmptyRequestEventBuilder
,RequestEventImpl.Builder
public interface RequestEventBuilder
A contract for
request monitoring event
builder.- Author:
- Miroslav Fuksa
-
Method Summary
Modifier and TypeMethodDescriptionbuild
(RequestEvent.Type eventType) Build the instance ofrequest event
.setContainerRequest
(ContainerRequest containerRequest) Set the container request.setContainerRequestFilters
(Iterable<ContainerRequestFilter> containerRequestFilters) Set request filters.setContainerResponse
(ContainerResponse containerResponse) Set the container response.setContainerResponseFilters
(Iterable<ContainerResponseFilter> containerResponseFilters) Set response filters.setException
(Throwable throwable, RequestEvent.ExceptionCause exceptionCause) Set exception thrown.setExceptionMapper
(ExceptionMapper<?> exceptionMapper) Set the exception mapper.setExtendedUriInfo
(ExtendedUriInfo extendedUriInfo) Set uri info.setResponseSuccessfullyMapped
(boolean responseSuccessfullyMapped) Set the flag indicating whether the response has been successfully mapped by an exception mapper.setResponseWritten
(boolean responseWritten) Set the flag indicating whether response has been successfully written.setSuccess
(boolean success) Set the flag indicating whether the response processing was successful.
-
Method Details
-
setExceptionMapper
Set the exception mapper.- Parameters:
exceptionMapper
- Exception mapper.- Returns:
- Builder instance.
-
setContainerRequest
Set the container request.- Parameters:
containerRequest
- Container request.- Returns:
- Builder instance.
-
setContainerResponse
Set the container response.- Parameters:
containerResponse
- Container response.- Returns:
- Builder instance.
-
setSuccess
Set the flag indicating whether the response processing was successful. Settrue
if the request and response has been successfully processed. Response is successfully processed when the response code is smaller than 400 and response was successfully written.- Parameters:
success
- True if response processing was successful.- Returns:
- Builder instance.
- See Also:
-
setResponseWritten
Set the flag indicating whether response has been successfully written.- Parameters:
responseWritten
-true
is response has been written without failure.- Returns:
- Builder instance.
-
setException
Set exception thrown.- Parameters:
throwable
- Exception.exceptionCause
- Cause of thethrowable
- Returns:
- Builder instance.
-
setExtendedUriInfo
Set uri info.- Parameters:
extendedUriInfo
- Extended uri info.- Returns:
- Builder instance.
-
setContainerResponseFilters
RequestEventBuilder setContainerResponseFilters(Iterable<ContainerResponseFilter> containerResponseFilters) Set response filters.- Parameters:
containerResponseFilters
- Container response filters.- Returns:
- Builder instance.
-
setContainerRequestFilters
RequestEventBuilder setContainerRequestFilters(Iterable<ContainerRequestFilter> containerRequestFilters) Set request filters.- Parameters:
containerRequestFilters
- Container request filters.- Returns:
- Request filters.
-
setResponseSuccessfullyMapped
Set the flag indicating whether the response has been successfully mapped by an exception mapper.- Parameters:
responseSuccessfullyMapped
-true
if the response has been successfully mapped.- Returns:
- Builder instance.
-
build
Build the instance ofrequest event
.- Parameters:
eventType
- Type of the event to be built.- Returns:
- Request event instance.
-