Class EmptyRequestEventBuilder
java.lang.Object
org.glassfish.jersey.server.internal.monitoring.EmptyRequestEventBuilder
- All Implemented Interfaces:
RequestEventBuilder
Empty mock implementation of
RequestEventBuilder.- Author:
- Miroslav Fuksa
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final EmptyRequestEventBuilderInstance of empty request event builder. -
Constructor Summary
Constructors -
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.
-
Field Details
-
INSTANCE
Instance of empty request event builder.
-
-
Constructor Details
-
EmptyRequestEventBuilder
public EmptyRequestEventBuilder()
-
-
Method Details
-
setExceptionMapper
Description copied from interface:RequestEventBuilderSet the exception mapper.- Specified by:
setExceptionMapperin interfaceRequestEventBuilder- Parameters:
exceptionMapper- Exception mapper.- Returns:
- Builder instance.
-
setContainerRequest
Description copied from interface:RequestEventBuilderSet the container request.- Specified by:
setContainerRequestin interfaceRequestEventBuilder- Parameters:
containerRequest- Container request.- Returns:
- Builder instance.
-
setContainerResponse
Description copied from interface:RequestEventBuilderSet the container response.- Specified by:
setContainerResponsein interfaceRequestEventBuilder- Parameters:
containerResponse- Container response.- Returns:
- Builder instance.
-
setSuccess
Description copied from interface:RequestEventBuilderSet the flag indicating whether the response processing was successful. Settrueif 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:
setSuccessin interfaceRequestEventBuilder- Parameters:
success- True if response processing was successful.- Returns:
- Builder instance.
- See Also:
-
setResponseWritten
Description copied from interface:RequestEventBuilderSet the flag indicating whether response has been successfully written.- Specified by:
setResponseWrittenin interfaceRequestEventBuilder- Parameters:
responseWritten-trueis response has been written without failure.- Returns:
- Builder instance.
-
setException
public RequestEventBuilder setException(Throwable throwable, RequestEvent.ExceptionCause exceptionCause) Description copied from interface:RequestEventBuilderSet exception thrown.- Specified by:
setExceptionin interfaceRequestEventBuilder- Parameters:
throwable- Exception.exceptionCause- Cause of thethrowable- Returns:
- Builder instance.
-
setExtendedUriInfo
Description copied from interface:RequestEventBuilderSet uri info.- Specified by:
setExtendedUriInfoin interfaceRequestEventBuilder- Parameters:
extendedUriInfo- Extended uri info.- Returns:
- Builder instance.
-
setContainerResponseFilters
public RequestEventBuilder setContainerResponseFilters(Iterable<ContainerResponseFilter> containerResponseFilters) Description copied from interface:RequestEventBuilderSet response filters.- Specified by:
setContainerResponseFiltersin interfaceRequestEventBuilder- Parameters:
containerResponseFilters- Container response filters.- Returns:
- Builder instance.
-
setContainerRequestFilters
public RequestEventBuilder setContainerRequestFilters(Iterable<ContainerRequestFilter> containerRequestFilters) Description copied from interface:RequestEventBuilderSet request filters.- Specified by:
setContainerRequestFiltersin interfaceRequestEventBuilder- Parameters:
containerRequestFilters- Container request filters.- Returns:
- Request filters.
-
setResponseSuccessfullyMapped
Description copied from interface:RequestEventBuilderSet the flag indicating whether the response has been successfully mapped by an exception mapper.- Specified by:
setResponseSuccessfullyMappedin interfaceRequestEventBuilder- Parameters:
responseSuccessfullyMapped-trueif the response has been successfully mapped.- Returns:
- Builder instance.
-
build
Description copied from interface:RequestEventBuilderBuild the instance ofrequest event.- Specified by:
buildin interfaceRequestEventBuilder- Parameters:
eventType- Type of the event to be built.- Returns:
- Request event instance.
-