org.glassfish.jersey.server.internal.monitoring
Interface RequestEventBuilder

All Known Implementing Classes:
EmptyRequestEventBuilder, RequestEventImpl.Builder

public interface RequestEventBuilder

Interface of builders of request events.

Author:
Miroslav Fuksa (miroslav.fuksa at oracle.com)

Method Summary
 RequestEvent build(RequestEvent.Type eventType)
          Build the instance of request event.
 RequestEventBuilder setContainerRequest(ContainerRequest containerRequest)
          Set the container request.
 RequestEventBuilder setContainerRequestFilters(Iterable<javax.ws.rs.container.ContainerRequestFilter> containerRequestFilters)
          Set request filters.
 RequestEventBuilder setContainerResponse(ContainerResponse containerResponse)
          Set the container response.
 RequestEventBuilder setContainerResponseFilters(Iterable<javax.ws.rs.container.ContainerResponseFilter> containerResponseFilters)
          Set response filters.
 RequestEventBuilder setException(Throwable throwable, RequestEvent.ExceptionCause exceptionCause)
          Set exception thrown.
 RequestEventBuilder setExceptionMapper(javax.ws.rs.ext.ExceptionMapper<?> exceptionMapper)
          Set the exception mapper.
 RequestEventBuilder setExtendedUriInfo(ExtendedUriInfo extendedUriInfo)
          Set uri info.
 RequestEventBuilder setResponseSuccessfullyMapped(boolean responseSuccessfullyMapped)
          Set the flag indicating whether the response has been successfully mapped by an exception mapper.
 RequestEventBuilder setResponseWritten(boolean responseWritten)
          Set the flag indicating whether response has been successfully written.
 RequestEventBuilder setSuccess(boolean success)
          Set the flag indicating whether the response processing was successful.
 

Method Detail

setExceptionMapper

RequestEventBuilder setExceptionMapper(javax.ws.rs.ext.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:
RequestEvent.isSuccess()

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<javax.ws.rs.container.ContainerResponseFilter> containerResponseFilters)
Set response filters.

Parameters:
containerResponseFilters - Container response filters.
Returns:
Builder instance.

setContainerRequestFilters

RequestEventBuilder setContainerRequestFilters(Iterable<javax.ws.rs.container.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.


Copyright © 2007-2013, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.