Package org.glassfish.jersey.server
Class ServerRuntime
- java.lang.Object
-
- org.glassfish.jersey.server.ServerRuntime
-
public class ServerRuntime extends java.lang.ObjectServer-side request processing runtime.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classServerRuntime.AbstractCallbackRunner<T>Abstract composite callback runner.private static classServerRuntime.AsyncResponderprivate static classServerRuntime.AsyncResponderHolderprivate static classServerRuntime.CompletionCallbackRunnerprivate static classServerRuntime.ConnectionCallbackRunnerprivate static classServerRuntime.Responder
-
Field Summary
Fields Modifier and Type Field Description private ApplicationEventListenerapplicationEventListenerprivate java.util.concurrent.ScheduledExecutorServicebackgroundSchedulerprivate javax.ws.rs.core.Configurationconfigurationprivate booleandisableLocationHeaderRelativeUriResolutionDo not resolve relative URIs in theLocationheaderprivate ExceptionMappersexceptionMappersprivate ExternalRequestScopeexternalRequestScopeprivate InjectionManagerinjectionManagerprivate javax.inject.Provider<java.util.concurrent.ExecutorService>managedAsyncExecutorprivate ProcessingProvidersprocessingProvidersprivate booleanprocessResponseErrorsprivate Stage<RequestProcessingContext>requestProcessingRootprivate RequestScoperequestScopeprivate booleanrfc7231LocationHeaderRelativeUriResolutionResolve relative URIs according to RFC7231 (not JAX-RS 2.0 compliantprivate TracingConfigtracingConfigprivate TracingLogger.LeveltracingThreshold
-
Constructor Summary
Constructors Modifier Constructor Description privateServerRuntime(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 ServerRuntimecreateServerRuntime(InjectionManager injectionManager, ServerBootstrapBag bootstrapBag, Stage<RequestProcessingContext> processingRoot, ApplicationEventListener eventListener, ProcessingProviders processingProviders)private static voidensureAbsolute(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.ScheduledExecutorServicegetBackgroundScheduler()Get the Jersey server runtime background scheduler.voidprocess(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 theLocationheader
-
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
-
-