Class RequestEventImpl.Builder
java.lang.Object
org.glassfish.jersey.server.internal.monitoring.RequestEventImpl.Builder
- All Implemented Interfaces:
RequestEventBuilder
- Enclosing class:
- RequestEventImpl
Builder of
RequestEventImpl
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild
(RequestEvent.Type type) 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.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setExceptionMapper
Description copied from interface:RequestEventBuilder
Set the exception mapper.- Specified by:
setExceptionMapper
in interfaceRequestEventBuilder
- Parameters:
exceptionMapper
- Exception mapper.- Returns:
- Builder instance.
-
setContainerRequest
Description copied from interface:RequestEventBuilder
Set the container request.- Specified by:
setContainerRequest
in interfaceRequestEventBuilder
- Parameters:
containerRequest
- Container request.- Returns:
- Builder instance.
-
setContainerResponse
Description copied from interface:RequestEventBuilder
Set the container response.- Specified by:
setContainerResponse
in interfaceRequestEventBuilder
- Parameters:
containerResponse
- Container response.- Returns:
- Builder instance.
-
setResponseWritten
Description copied from interface:RequestEventBuilder
Set the flag indicating whether response has been successfully written.- Specified by:
setResponseWritten
in interfaceRequestEventBuilder
- Parameters:
responseWritten
-true
is response has been written without failure.- Returns:
- Builder instance.
-
setSuccess
Description copied from interface:RequestEventBuilder
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.- Specified by:
setSuccess
in interfaceRequestEventBuilder
- Parameters:
success
- True if response processing was successful.- Returns:
- Builder instance.
- See Also:
-
setException
public RequestEventImpl.Builder setException(Throwable throwable, RequestEvent.ExceptionCause exceptionCause) Description copied from interface:RequestEventBuilder
Set exception thrown.- Specified by:
setException
in interfaceRequestEventBuilder
- Parameters:
throwable
- Exception.exceptionCause
- Cause of thethrowable
- Returns:
- Builder instance.
-
setExtendedUriInfo
Description copied from interface:RequestEventBuilder
Set uri info.- Specified by:
setExtendedUriInfo
in interfaceRequestEventBuilder
- Parameters:
extendedUriInfo
- Extended uri info.- Returns:
- Builder instance.
-
setContainerResponseFilters
public RequestEventImpl.Builder setContainerResponseFilters(Iterable<ContainerResponseFilter> containerResponseFilters) Description copied from interface:RequestEventBuilder
Set response filters.- Specified by:
setContainerResponseFilters
in interfaceRequestEventBuilder
- Parameters:
containerResponseFilters
- Container response filters.- Returns:
- Builder instance.
-
setContainerRequestFilters
public RequestEventImpl.Builder setContainerRequestFilters(Iterable<ContainerRequestFilter> containerRequestFilters) Description copied from interface:RequestEventBuilder
Set request filters.- Specified by:
setContainerRequestFilters
in interfaceRequestEventBuilder
- Parameters:
containerRequestFilters
- Container request filters.- Returns:
- Request filters.
-
setResponseSuccessfullyMapped
Description copied from interface:RequestEventBuilder
Set the flag indicating whether the response has been successfully mapped by an exception mapper.- Specified by:
setResponseSuccessfullyMapped
in interfaceRequestEventBuilder
- Parameters:
responseSuccessfullyMapped
-true
if the response has been successfully mapped.- Returns:
- Builder instance.
-
build
Description copied from interface:RequestEventBuilder
Build the instance ofrequest event
.- Specified by:
build
in interfaceRequestEventBuilder
- Parameters:
type
- Type of the event to be built.- Returns:
- Request event instance.
-