Class HttpProcessors


  • public final class HttpProcessors
    extends java.lang.Object
    Factory class for standard HttpProcessor instances.
    Since:
    5.0
    • Constructor Detail

      • HttpProcessors

        public HttpProcessors()
    • Method Detail

      • customServer

        public static HttpProcessorBuilder customServer​(java.lang.String serverInfo)
        Creates HttpProcessorBuilder initialized with default protocol interceptors for server side HTTP/1.1 processing.
        Parameters:
        serverInfo - the server info text or null for default.
        Returns:
        the processor builder.
      • server

        public static HttpProcessor server​(java.lang.String serverInfo)
        Creates HttpProcessor initialized with default protocol interceptors for server side HTTP/1.1 processing.
        Parameters:
        serverInfo - the server info text or null for default.
        Returns:
        the processor.
      • server

        public static HttpProcessor server()
        Creates HttpProcessor initialized with default protocol interceptors for server side HTTP/1.1 processing.
        Returns:
        the processor.
      • customClient

        public static HttpProcessorBuilder customClient​(java.lang.String agentInfo)
        Creates HttpProcessorBuilder initialized with default protocol interceptors for client side HTTP/1.1 processing.
        Parameters:
        agentInfo - the agent info text or null for default.
        Returns:
        the processor builder.
      • strictClient

        public static HttpProcessorBuilder strictClient​(java.lang.String agentInfo)
        Creates an HttpProcessorBuilder initialized with strict protocol interceptors for client-side HTTP/1.1 processing.

        This configuration enforces stricter validation and processing of client requests, ensuring compliance with the HTTP protocol. It includes interceptors for handling target hosts, content, connection controls, and TE header validation, among others. The user agent can be customized using the provided agentInfo parameter.

        Parameters:
        agentInfo - the user agent info to be included in the User-Agent header. If null or blank, a default value will be used.
        Returns:
        the HttpProcessorBuilder configured with strict client-side interceptors.
        Since:
        5.4
      • customClient

        public static HttpProcessorBuilder customClient​(java.lang.String agentInfo,
                                                        boolean strict)
        Creates HttpProcessorBuilder initialized with default protocol interceptors for client side HTTP/1.1 processing.
        Parameters:
        agentInfo - the agent info text or null for default.
        Returns:
        the processor builder.
        Since:
        5.4
      • client

        public static HttpProcessor client​(java.lang.String agentInfo)
        Creates HttpProcessor initialized with default protocol interceptors for client side HTTP/1.1 processing.
        Parameters:
        agentInfo - the agent info text or null for default.
        Returns:
        the processor.
      • client

        public static HttpProcessor client()
        Creates HttpProcessor initialized with default protocol interceptors for client side HTTP/1.1 processing.
        Returns:
        the processor.
      • client

        public static HttpProcessor client​(java.lang.String agentInfo,
                                           boolean strict)
        Creates an HttpProcessor for client-side HTTP/2 processing. This method allows the option to include strict protocol interceptors.
        Parameters:
        agentInfo - the agent info text or null for default.
        strict - if true, strict protocol interceptors will be added, including the TE header validation.
        Returns:
        the configured HTTP processor.
        Since:
        5.4
      • clientStrict

        public static HttpProcessor clientStrict()
        Creates an HttpProcessor for client-side HTTP/2 processing with strict protocol validation interceptors by default.

        Strict validation includes additional checks such as validating the TE header.

        Returns:
        the configured strict HTTP processor.
        Since:
        5.4
      • clientStrict

        public static HttpProcessor clientStrict​(java.lang.String agentInfo)
        Creates an HttpProcessor for client-side HTTP/2 processing with strict protocol validation interceptors, using the specified agent information.

        Strict validation includes additional checks such as validating the TE header.

        Parameters:
        agentInfo - the agent info text or null for default.
        Returns:
        the configured strict HTTP processor.
        Since:
        5.4