Class RequestEventImpl

    • Field Detail

      • throwable

        private final java.lang.Throwable throwable
      • containerResponseFilters

        private final java.lang.Iterable<javax.ws.rs.container.ContainerResponseFilter> containerResponseFilters
      • containerRequestFilters

        private final java.lang.Iterable<javax.ws.rs.container.ContainerRequestFilter> containerRequestFilters
      • exceptionMapper

        private final javax.ws.rs.ext.ExceptionMapper<?> exceptionMapper
      • success

        private final boolean success
      • responseSuccessfullyMapped

        private final boolean responseSuccessfullyMapped
      • responseWritten

        private final boolean responseWritten
    • Constructor Detail

      • RequestEventImpl

        private RequestEventImpl​(RequestEvent.Type type,
                                 ContainerRequest containerRequest,
                                 ContainerResponse containerResponse,
                                 java.lang.Throwable throwable,
                                 ExtendedUriInfo extendedUriInfo,
                                 java.lang.Iterable<javax.ws.rs.container.ContainerResponseFilter> containerResponseFilters,
                                 java.lang.Iterable<javax.ws.rs.container.ContainerRequestFilter> containerRequestFilters,
                                 javax.ws.rs.ext.ExceptionMapper<?> exceptionMapper,
                                 boolean success,
                                 boolean responseSuccessfullyMapped,
                                 RequestEvent.ExceptionCause exceptionCause,
                                 boolean responseWritten)
    • Method Detail

      • getContainerResponse

        public ContainerResponse getContainerResponse()
        Description copied from interface: RequestEvent
        Get the container response. The response is available only for certain event types. The returned response might vary also on the event type. The getter returns always the latest response being processed. So, for example for event RequestEvent.Type.EXCEPTION_MAPPING_FINISHED event type the method returns mapped response and not the original response created from execution of the resource method.
        Specified by:
        getContainerResponse in interface RequestEvent
        Returns:
        Latest response being processed or null if no response has been produced yet.
      • getException

        public java.lang.Throwable getException()
        Description copied from interface: RequestEvent
        Get the latest exception, if any, thrown by the request and response processing. When this method returns not null value, the method RequestEvent.getExceptionCause() returns the origin of the exception.
        Specified by:
        getException in interface RequestEvent
        Returns:
        Exception thrown or null if no exception has been thrown.
      • getUriInfo

        public ExtendedUriInfo getUriInfo()
        Description copied from interface: RequestEvent
        Get the extended uri info associated with this request. This method returns null for RequestEvent.Type.START event. The returned ExtendedUriInfo can be used to retrieve information relevant to many event types (especially event types describing the matching process).
        Specified by:
        getUriInfo in interface RequestEvent
        Returns:
        Extended uri info or null if it is not available yet.
      • getExceptionMapper

        public javax.ws.rs.ext.ExceptionMapper<?> getExceptionMapper()
        Description copied from interface: RequestEvent
        Get the ExceptionMapper that was found and used during the exception mapping phase.
        Specified by:
        getExceptionMapper in interface RequestEvent
        Returns:
        Exception mapper or null if no exception mapper was found or even needed.
      • getContainerRequestFilters

        public java.lang.Iterable<javax.ws.rs.container.ContainerRequestFilter> getContainerRequestFilters()
        Description copied from interface: RequestEvent
        Get container request filters used during the request filtering phase.
        Specified by:
        getContainerRequestFilters in interface RequestEvent
        Returns:
        Container request filters or null if no filters were used yet.
      • getContainerResponseFilters

        public java.lang.Iterable<javax.ws.rs.container.ContainerResponseFilter> getContainerResponseFilters()
        Description copied from interface: RequestEvent
        Get container response filters used during the response filtering phase.
        Specified by:
        getContainerResponseFilters in interface RequestEvent
        Returns:
        Container response filter or null if no filters were used yet.
      • isSuccess

        public boolean isSuccess()
        Description copied from interface: RequestEvent
        Return 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. If the exception occurred but was mapped into a response with successful response code and written, this method returns true.
        Specified by:
        isSuccess in interface RequestEvent
        Returns:
        True if the response was successfully processed.
      • isResponseSuccessfullyMapped

        public boolean isResponseSuccessfullyMapped()
        Description copied from interface: RequestEvent
        Returns true if the response was successfully mapped from an exception by exception mappers. When exception mapping phase failed or when no exception was thrown at all the, the method returns false. This method is convenient when handling the RequestEvent.Type.EXCEPTION_MAPPING_FINISHED event type.
        Specified by:
        isResponseSuccessfullyMapped in interface RequestEvent
        Returns:
        True if the exception occurred and it was successfully mapped into a response.
      • isResponseWritten

        public boolean isResponseWritten()
        Description copied from interface: RequestEvent
        Returns true if the response has been successfully written. true is returned even for cases when the written response contains error response code.
        Specified by:
        isResponseWritten in interface RequestEvent
        Returns:
        true if the response was successfully written;false when the response has not been written yet or when writing of response failed.