Class ServerFilterConfiguration

    • Constructor Detail

      • ServerFilterConfiguration

        public ServerFilterConfiguration()
      • ServerFilterConfiguration

        public ServerFilterConfiguration​(String serverName,
                                         String serverVersion)
    • Method Detail

      • getHttpServerName

        public String getHttpServerName()
        Returns:
        the server name used for headers and default error pages.
      • setHttpServerName

        public void setHttpServerName​(String httpServerName)
        Sets the server name used for HTTP response headers and default generated error pages. If not value is explicitly set, this value defaults to Grizzly.
        Parameters:
        httpServerName - server name
      • getHttpServerVersion

        public String getHttpServerVersion()
        Returns:
        the version of this server used for headers and default error pages.
      • setHttpServerVersion

        public void setHttpServerVersion​(String httpServerVersion)
        Sets the version of the server info sent in HTTP response headers and the default generated error pages. If not value is explicitly set, this value defaults to the current version of the Grizzly runtime.
        Parameters:
        httpServerVersion - server version
      • getScheme

        public String getScheme()
        Get the HTTP request scheme, which if non-null overrides default one picked up by framework during runtime.
        Returns:
        the HTTP request scheme
        Since:
        2.2.4
      • setScheme

        public void setScheme​(String scheme)
        Set the HTTP request scheme, which if non-null overrides default one picked up by framework during runtime.
        Parameters:
        scheme - the HTTP request scheme
        Since:
        2.2.4
      • getBackendConfiguration

        public BackendConfiguration getBackendConfiguration()
        Returns:
        the auxiliary configuration, which might be used, when Grizzly HttpServer is running behind HTTP gateway like reverse proxy or load balancer.
        Since:
        2.3.18
      • setBackendConfiguration

        public void setBackendConfiguration​(BackendConfiguration backendConfiguration)
        Sets the auxiliary configuration, which might be used, when Grizzly HttpServer is running behind HTTP gateway like reverse proxy or load balancer.
        Parameters:
        backendConfiguration - BackendConfiguration
        Since:
        2.3.18
      • isPassTraceRequest

        public boolean isPassTraceRequest()
        Returns:
        true if the TRACE request will be passed to the registered HttpHandlers, otherwise false if the TRACE request will be handled by Grizzly.
        Since:
        2.2.7
      • setPassTraceRequest

        public void setPassTraceRequest​(boolean passTraceRequest)
        If passTraceRequest is true, the TRACE request will be passed to the registered HttpHandlers. Otherwise, TRACE will be handled by Grizzly. By default, TRACE requests will be handled by Grizzly.
        Parameters:
        passTraceRequest - boolean to configure if trace requests will be handled by Grizzly or by a configured HttpHandler.
        Since:
        2.2.7
      • isTraceEnabled

        public boolean isTraceEnabled()
        Returns:
        true if a proper response to HTTP TRACE is to be generated, or false if a 405 is to be returned instead.
        Since:
        2.2.7
      • setTraceEnabled

        public void setTraceEnabled​(boolean enabled)
        If enabled is true the TRACE method will be respected and a proper response will be generated. Otherwise, the method will be considered as not allowed and an HTTP 405 will be returned. This method only comes into effect when setPassTraceRequest(false) has been called.
        Parameters:
        enabled - boolean to configure how grizzly handles TRACE requests
        Since:
        2.2.7
      • getMaxRequestParameters

        public int getMaxRequestParameters()
        Returns the maximum number of parameters allowed per request. If the value is less than zero, then there will be no limit on parameters. By default, the limit imposed is 10000.
        Returns:
        the maximum number of parameters, or -1 if there is no imposed limit.
        Since:
        2.2.8
      • setMaxRequestParameters

        public void setMaxRequestParameters​(int maxRequestParameters)
        Sets the maximum number of parameters allowed for a request.
        Parameters:
        maxRequestParameters - the maximum number of parameters.
        Since:
        2.2.8
      • isReuseSessionID

        @Deprecated
        public boolean isReuseSessionID()
        Deprecated.
        since 2.3.17
        Returns the "reuse session IDs when creating sessions"
        Since:
        2.2.19
      • setReuseSessionID

        @Deprecated
        public void setReuseSessionID​(boolean isReuseSessionID)
        Deprecated.
        since 2.3.17
        Sets the "reuse session IDs when creating sessions"
        Since:
        2.2.19
      • getMaxPostSize

        public long getMaxPostSize()
        Gets the maximum size of the POST body. -1 value means no size limits applied.
        Since:
        2.3.13
      • setMaxPostSize

        public void setMaxPostSize​(long maxPostSize)
        Sets the maximum size of the POST body. -1 value means no size limits applied.
        Since:
        2.3.13
      • getMaxFormPostSize

        public int getMaxFormPostSize()
        Gets the maximum size of the POST body generated by an HTML form. -1 value means no size limits applied.
        Since:
        2.3
      • setMaxFormPostSize

        public void setMaxFormPostSize​(int maxFormPostSize)
        Sets the maximum size of the POST body generated by an HTML form. -1 value means no size limits applied.
        Since:
        2.3
      • getMaxBufferedPostSize

        public int getMaxBufferedPostSize()
        Gets the maximum POST body size, which can buffered in memory. -1 value means no size limits applied.
        Since:
        2.3
      • setMaxBufferedPostSize

        public void setMaxBufferedPostSize​(int maxBufferedPostSize)
        Sets the maximum POST body size, which can buffered in memory. -1 value means no size limits applied.
        Since:
        2.3
      • getDefaultQueryEncoding

        public Charset getDefaultQueryEncoding()
        Returns:
        the default character encoding used to decode request URI's query part. null value means specific request's character encoding will be used
      • setDefaultQueryEncoding

        public void setDefaultQueryEncoding​(Charset defaultQueryEncoding)
        Sets the default character encoding used to decode request URI's query part. null value means specific request's character encoding will be used.
      • setDefaultErrorPageGenerator

        public void setDefaultErrorPageGenerator​(ErrorPageGenerator defaultErrorPageGenerator)
        Sets the default ErrorPageGenerator.
        Parameters:
        defaultErrorPageGenerator -
      • isGracefulShutdownSupported

        public boolean isGracefulShutdownSupported()
        Returns:
        true, if HttpServerFilter has to support graceful shutdown, or false otherwise
      • setGracefulShutdownSupported

        public void setGracefulShutdownSupported​(boolean isGracefulShutdownSupported)
        Enables or disables graceful shutdown support.
        Parameters:
        isGracefulShutdownSupported -
      • getSessionTimeoutSeconds

        public int getSessionTimeoutSeconds()
        Returns the maximum time interval, in seconds, that the HTTP server will keep this session open between client accesses. After this interval, the HTTP server will invalidate the session.

        A return value of zero or less indicates that the session will never timeout.

        Returns:
        an integer specifying the number of seconds this session remains open between client requests
        See Also:
        setSessionTimeoutSeconds(int)
      • setSessionTimeoutSeconds

        public void setSessionTimeoutSeconds​(int sessionTimeoutSeconds)
        Specifies the time, in seconds, between client requests before the HTTP server will invalidate this session.

        An interval value of zero or less indicates that the session should never timeout.

        Parameters:
        sessionTimeoutSeconds - An integer specifying the number of seconds