Enum Class HttpServiceConfig

java.lang.Object
java.lang.Enum<HttpServiceConfig>
org.wildfly.httpclient.common.HttpServiceConfig
All Implemented Interfaces:
Serializable, Comparable<HttpServiceConfig>, Constable

public enum HttpServiceConfig extends Enum<HttpServiceConfig>
Mode configuration for http services.

The http services are internal server services responsible for handling client requests, and they are simple pojos conventionally named Http*Service.

Author:
Flavia Rainone
  • Enum Constant Details

    • DEFAULT

      public static final HttpServiceConfig DEFAULT
      Default configuration. Used by both EE namespace interoperable and non-interoperable servers
  • Method Details

    • values

      public static HttpServiceConfig[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static HttpServiceConfig valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getInstance

      public static HttpServiceConfig getInstance()
      Returns the default configuration.
      Returns:
      the configuration for http services
    • wrap

      public HttpHandler wrap(HttpHandler handler)
      Wraps the http service handler. Should be applied to all http handlers configured by a http service.
      Parameters:
      handler - responsible for handling the HTTP service requests directed to a specific URI
      Returns:
      the HttpHandler that should be provided to Undertow and associated with the HTTP service URI. The resulting handler is a wrapper that will add any necessary actions before invoking the inner handler.
    • getHttpUnmarshallerFactory

      public HttpMarshallerFactory getHttpUnmarshallerFactory(HttpServerExchange exchange)
      Returns the http marshaller factory that must be used for unmarshalling the objects from service requests bytes.
      Parameters:
      exchange - the server exchange
      Returns:
      the HTTP marshaller factory for unmarshalling server request objects
    • getHttpMarshallerFactory

      public HttpMarshallerFactory getHttpMarshallerFactory(HttpServerExchange exchange)
      Returns the http marshaller factory that must be used for marshalling the service responses as bytes to be sent as a server response data.
      Parameters:
      exchange - the server exchange
      Returns:
      the HTTP marshaller factory for marshalling server responses