Class ServerRuntime


  • public class ServerRuntime
    extends java.lang.Object
    Server-side request processing runtime.
    • Field Detail

      • backgroundScheduler

        private final java.util.concurrent.ScheduledExecutorService backgroundScheduler
      • managedAsyncExecutor

        private final javax.inject.Provider<java.util.concurrent.ExecutorService> managedAsyncExecutor
      • configuration

        private final javax.ws.rs.core.Configuration configuration
      • processResponseErrors

        private final boolean processResponseErrors
      • disableLocationHeaderRelativeUriResolution

        private final boolean disableLocationHeaderRelativeUriResolution
        Do not resolve relative URIs in the Location header
      • rfc7231LocationHeaderRelativeUriResolution

        private final boolean rfc7231LocationHeaderRelativeUriResolution
        Resolve relative URIs according to RFC7231 (not JAX-RS 2.0 compliant
    • Method Detail

      • 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 to true, 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