Interface RequestEventBuilder

All Known Implementing Classes:
EmptyRequestEventBuilder, RequestEventImpl.Builder

public interface RequestEventBuilder
A contract for request monitoring event builder.
Author:
Miroslav Fuksa
  • Method Details

    • 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. Set true 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

      RequestEventBuilder setResponseWritten(boolean responseWritten)
      Set the flag indicating whether response has been successfully written.
      Parameters:
      responseWritten - true is 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 the throwable
      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 - true if the response has been successfully mapped.
      Returns:
      Builder instance.
    • build

      RequestEvent build(RequestEvent.Type eventType)
      Build the instance of request event.
      Parameters:
      eventType - Type of the event to be built.
      Returns:
      Request event instance.