Package org.glassfish.jersey.server
Class ServerRuntime
- java.lang.Object
-
- org.glassfish.jersey.server.ServerRuntime
-
public class ServerRuntime extends java.lang.Object
Server-side request processing runtime.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
ServerRuntime.AbstractCallbackRunner<T>
Abstract composite callback runner.private static class
ServerRuntime.AsyncResponder
private static class
ServerRuntime.AsyncResponderHolder
private static class
ServerRuntime.CompletionCallbackRunner
private static class
ServerRuntime.ConnectionCallbackRunner
private static class
ServerRuntime.Responder
-
Field Summary
Fields Modifier and Type Field Description private ApplicationEventListener
applicationEventListener
private java.util.concurrent.ScheduledExecutorService
backgroundScheduler
private javax.ws.rs.core.Configuration
configuration
private boolean
disableLocationHeaderRelativeUriResolution
Do not resolve relative URIs in theLocation
headerprivate ExceptionMappers
exceptionMappers
private ExternalRequestScope
externalRequestScope
private InjectionManager
injectionManager
private javax.inject.Provider<java.util.concurrent.ExecutorService>
managedAsyncExecutor
private ProcessingProviders
processingProviders
private boolean
processResponseErrors
private Stage<RequestProcessingContext>
requestProcessingRoot
private RequestScope
requestScope
private boolean
rfc7231LocationHeaderRelativeUriResolution
Resolve relative URIs according to RFC7231 (not JAX-RS 2.0 compliantprivate TracingConfig
tracingConfig
private TracingLogger.Level
tracingThreshold
-
Constructor Summary
Constructors Modifier Constructor Description private
ServerRuntime(Stage<RequestProcessingContext> requestProcessingRoot, ProcessingProviders processingProviders, InjectionManager injectionManager, java.util.concurrent.ScheduledExecutorService backgroundScheduler, javax.inject.Provider<java.util.concurrent.ExecutorService> managedAsyncExecutorProvider, RequestScope requestScope, ExceptionMappers exceptionMappers, ApplicationEventListener applicationEventListener, ExternalRequestScope externalScope, javax.ws.rs.core.Configuration configuration)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static ServerRuntime
createServerRuntime(InjectionManager injectionManager, ServerBootstrapBag bootstrapBag, Stage<RequestProcessingContext> processingRoot, ApplicationEventListener eventListener, ProcessingProviders processingProviders)
private static void
ensureAbsolute(java.net.URI location, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> headers, ContainerRequest request, boolean incompatible)
Ensure that the value a "Location" header is an absolute URI, if present among headers.(package private) java.util.concurrent.ScheduledExecutorService
getBackgroundScheduler()
Get the Jersey server runtime background scheduler.void
process(ContainerRequest request)
Process a container request.
-
-
-
Field Detail
-
requestProcessingRoot
private final Stage<RequestProcessingContext> requestProcessingRoot
-
processingProviders
private final ProcessingProviders processingProviders
-
injectionManager
private final InjectionManager injectionManager
-
backgroundScheduler
private final java.util.concurrent.ScheduledExecutorService backgroundScheduler
-
managedAsyncExecutor
private final javax.inject.Provider<java.util.concurrent.ExecutorService> managedAsyncExecutor
-
requestScope
private final RequestScope requestScope
-
exceptionMappers
private final ExceptionMappers exceptionMappers
-
applicationEventListener
private final ApplicationEventListener applicationEventListener
-
configuration
private final javax.ws.rs.core.Configuration configuration
-
externalRequestScope
private final ExternalRequestScope externalRequestScope
-
tracingConfig
private final TracingConfig tracingConfig
-
tracingThreshold
private final TracingLogger.Level tracingThreshold
-
processResponseErrors
private final boolean processResponseErrors
-
disableLocationHeaderRelativeUriResolution
private final boolean disableLocationHeaderRelativeUriResolution
Do not resolve relative URIs in theLocation
header
-
rfc7231LocationHeaderRelativeUriResolution
private final boolean rfc7231LocationHeaderRelativeUriResolution
Resolve relative URIs according to RFC7231 (not JAX-RS 2.0 compliant
-
-
Constructor Detail
-
ServerRuntime
private ServerRuntime(Stage<RequestProcessingContext> requestProcessingRoot, ProcessingProviders processingProviders, InjectionManager injectionManager, java.util.concurrent.ScheduledExecutorService backgroundScheduler, javax.inject.Provider<java.util.concurrent.ExecutorService> managedAsyncExecutorProvider, RequestScope requestScope, ExceptionMappers exceptionMappers, ApplicationEventListener applicationEventListener, ExternalRequestScope externalScope, javax.ws.rs.core.Configuration configuration)
-
-
Method Detail
-
createServerRuntime
static ServerRuntime createServerRuntime(InjectionManager injectionManager, ServerBootstrapBag bootstrapBag, Stage<RequestProcessingContext> processingRoot, ApplicationEventListener eventListener, ProcessingProviders processingProviders)
-
process
public void process(ContainerRequest request)
Process a container request.- Parameters:
request
- container request to be processed.
-
getBackgroundScheduler
java.util.concurrent.ScheduledExecutorService getBackgroundScheduler()
Get the Jersey server runtime background scheduler.- Returns:
- server runtime background scheduler.
- See Also:
BackgroundScheduler
-
ensureAbsolute
private static void ensureAbsolute(java.net.URI location, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> headers, ContainerRequest request, boolean incompatible)
Ensure that the value a "Location" header is an absolute URI, if present among headers. Relative URI value will be made absolute using a base request URI.- Parameters:
location
- location URI; value of the HTTP "Location" response header.headers
- mutable map of response headers.request
- container request.incompatible
- if set totrue
, uri will be resolved against the request uri, not the base uri; this is correct against RFC7231, but does violate the JAX-RS 2.0 specs
-
-