Package org.wildfly.httpclient.common
Enum Class HttpServiceConfig
- All Implemented Interfaces:
Serializable,Comparable<HttpServiceConfig>,Constable
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
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptiongetHttpMarshallerFactory(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.getHttpUnmarshallerFactory(HttpServerExchange exchange) Returns the http marshaller factory that must be used for unmarshalling the objects from service requests bytes.static HttpServiceConfigReturns the default configuration.static HttpServiceConfigReturns the enum constant of this class with the specified name.static HttpServiceConfig[]values()Returns an array containing the constants of this enum class, in the order they are declared.wrap(HttpHandler handler) Wraps the http service handler.
-
Enum Constant Details
-
DEFAULT
Default configuration. Used by both EE namespace interoperable and non-interoperable servers
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
getInstance
Returns the default configuration.- Returns:
- the configuration for http services
-
wrap
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
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
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
-