Interface RequestEventBuilder
-
- All Known Implementing Classes:
EmptyRequestEventBuilder,RequestEventImpl.Builder
public interface RequestEventBuilderA contract forrequest monitoring eventbuilder.- Author:
- Miroslav Fuksa
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RequestEventbuild(RequestEvent.Type eventType)Build the instance ofrequest event.RequestEventBuildersetContainerRequest(ContainerRequest containerRequest)Set the container request.RequestEventBuildersetContainerRequestFilters(Iterable<ContainerRequestFilter> containerRequestFilters)Set request filters.RequestEventBuildersetContainerResponse(ContainerResponse containerResponse)Set the container response.RequestEventBuildersetContainerResponseFilters(Iterable<ContainerResponseFilter> containerResponseFilters)Set response filters.RequestEventBuildersetException(Throwable throwable, RequestEvent.ExceptionCause exceptionCause)Set exception thrown.RequestEventBuildersetExceptionMapper(ExceptionMapper<?> exceptionMapper)Set the exception mapper.RequestEventBuildersetExtendedUriInfo(ExtendedUriInfo extendedUriInfo)Set uri info.RequestEventBuildersetResponseSuccessfullyMapped(boolean responseSuccessfullyMapped)Set the flag indicating whether the response has been successfully mapped by an exception mapper.RequestEventBuildersetResponseWritten(boolean responseWritten)Set the flag indicating whether response has been successfully written.RequestEventBuildersetSuccess(boolean success)Set the flag indicating whether the response processing was successful.
-
-
-
Method Detail
-
setExceptionMapper
RequestEventBuilder setExceptionMapper(ExceptionMapper<?> exceptionMapper)
Set the exception mapper.- Parameters:
exceptionMapper- Exception mapper.- Returns:
- Builder instance.
-
setContainerRequest
RequestEventBuilder setContainerRequest(ContainerRequest containerRequest)
Set the container request.- Parameters:
containerRequest- Container request.- Returns:
- Builder instance.
-
setContainerResponse
RequestEventBuilder setContainerResponse(ContainerResponse containerResponse)
Set the container response.- Parameters:
containerResponse- Container response.- Returns:
- Builder instance.
-
setSuccess
RequestEventBuilder setSuccess(boolean success)
Set 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.- Parameters:
success- True if response processing was successful.- Returns:
- Builder instance.
- See Also:
RequestEvent.isSuccess()
-
setResponseWritten
RequestEventBuilder setResponseWritten(boolean responseWritten)
Set the flag indicating whether response has been successfully written.- Parameters:
responseWritten-trueis response has been written without failure.- Returns:
- Builder instance.
-
setException
RequestEventBuilder setException(Throwable throwable, RequestEvent.ExceptionCause exceptionCause)
Set exception thrown.- Parameters:
throwable- Exception.exceptionCause- Cause of thethrowable- Returns:
- Builder instance.
-
setExtendedUriInfo
RequestEventBuilder setExtendedUriInfo(ExtendedUriInfo extendedUriInfo)
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
RequestEventBuilder setResponseSuccessfullyMapped(boolean responseSuccessfullyMapped)
Set the flag indicating whether the response has been successfully mapped by an exception mapper.- Parameters:
responseSuccessfullyMapped-trueif the response has been successfully mapped.- Returns:
- Builder instance.
-
build
RequestEvent build(RequestEvent.Type eventType)
Build the instance ofrequest event.- Parameters:
eventType- Type of the event to be built.- Returns:
- Request event instance.
-
-