Package org.glassfish.jersey.server
Class ServerRuntime.Responder
- java.lang.Object
-
- org.glassfish.jersey.server.ServerRuntime.Responder
-
- Enclosing class:
- ServerRuntime
private static class ServerRuntime.Responder extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private ServerRuntime.CompletionCallbackRunnercompletionCallbackRunnerprivate ServerRuntime.ConnectionCallbackRunnerconnectionCallbackRunnerprivate static java.util.logging.LoggerLOGGERprivate RequestProcessingContextprocessingContextprivate ServerRuntimeruntimeprivate TracingLoggertracingLogger
-
Constructor Summary
Constructors Constructor Description Responder(RequestProcessingContext processingContext, ServerRuntime runtime)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private ContainerResponseconvertResponse(javax.ws.rs.core.Response exceptionResponse)private javax.ws.rs.core.ResponsemapException(java.lang.Throwable originalThrowable)voidprocess(java.lang.Throwable throwable)Processthrowableby using exception mappers and generating the mapped response if possible.voidprocess(ContainerResponse response)private ContainerResponseprocessResponse(ContainerResponse response)private booleanprocessResponseError(java.lang.Throwable responseError)If "jersey.config.server.exception.processResponseErrors" is set to true then try to handle errors raised during response processing.private voidrelease(ContainerResponse responseContext)private voidsetWrittenResponse(ContainerResponse response)private ContainerResponsewriteResponse(ContainerResponse response)
-
-
-
Field Detail
-
LOGGER
private static final java.util.logging.Logger LOGGER
-
processingContext
private final RequestProcessingContext processingContext
-
runtime
private final ServerRuntime runtime
-
completionCallbackRunner
private final ServerRuntime.CompletionCallbackRunner completionCallbackRunner
-
connectionCallbackRunner
private final ServerRuntime.ConnectionCallbackRunner connectionCallbackRunner
-
tracingLogger
private final TracingLogger tracingLogger
-
-
Constructor Detail
-
Responder
public Responder(RequestProcessingContext processingContext, ServerRuntime runtime)
-
-
Method Detail
-
process
public void process(ContainerResponse response)
-
processResponse
private ContainerResponse processResponse(ContainerResponse response)
-
process
public void process(java.lang.Throwable throwable)
Processthrowableby using exception mappers and generating the mapped response if possible.Note about logging:
- we do not log exceptions that are mapped by ExceptionMappers.
- All other exceptions are logged: WebApplicationExceptions with entities, exceptions that were unsuccessfully mapped
- Parameters:
throwable- Exception to be processed.
-
processResponseError
private boolean processResponseError(java.lang.Throwable responseError)
If "jersey.config.server.exception.processResponseErrors" is set to true then try to handle errors raised during response processing.- Parameters:
responseError- a throwable that occurred during response processing.- Returns:
trueif the given response error has been processed,falseotherwise.
-
convertResponse
private ContainerResponse convertResponse(javax.ws.rs.core.Response exceptionResponse)
-
mapException
private javax.ws.rs.core.Response mapException(java.lang.Throwable originalThrowable) throws java.lang.Throwable- Throws:
java.lang.Throwable
-
writeResponse
private ContainerResponse writeResponse(ContainerResponse response)
-
setWrittenResponse
private void setWrittenResponse(ContainerResponse response)
-
release
private void release(ContainerResponse responseContext)
-
-