Package org.forgerock.openig.handler
Class ReverseProxyHandlerHeaplet
- java.lang.Object
-
- org.forgerock.openig.heap.GenericHeaplet
-
- org.forgerock.openig.handler.HttpClientHandlerHeaplet
-
- org.forgerock.openig.handler.ReverseProxyHandlerHeaplet
-
- All Implemented Interfaces:
Heaplet
public class ReverseProxyHandlerHeaplet extends HttpClientHandlerHeaplet
Creates a reverse proxyHandler
in a heap environment.A reverse proxy
Handler
serves the purpose of proxying requests from the client to the protected application.It supports the following configuration items:
"config": { "websocket": { "enabled": false, "soTimeout: "10 seconds", "connectionTimeout": "10 seconds", "tls": "RefToTlsOptions", "proxyOptions": "myProxyOptions" } }
The websocket optional attribute, if present gives access to Web Socket specific configuration options. It's disabled by default, and if the inner attributes are not valued, they default to the corresponding attribute's value in the ClientHandler configuration (/websocket/soTimeout -> /soTimeout for instance).
- See Also:
BadGatewayFilter
-
-
Field Summary
Fields Modifier and Type Field Description static String
CONFIG_WEBSOCKET
Constant for the configuration websocket.-
Fields inherited from class org.forgerock.openig.handler.HttpClientHandlerHeaplet
CONFIG_ASYNC_BEHAVIOR, CONFIG_ENABLE_CONNECTION_STATE, CONFIG_HTTP2_PRIOR_KNOWLEDGE, CONFIG_NUMBER_OF_WORKERS, CONFIG_PROTOCOL_VERSION, CONFIG_WAIT_QUEUE_SIZE
-
-
Constructor Summary
Constructors Constructor Description ReverseProxyHandlerHeaplet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
Called to indicate that the object created by the heaplet is going to be dereferenced.protected List<Filter>
filters(org.forgerock.openig.http.spi.HttpClientLoader loader, Options options)
Returns a list ofFilter
that will be executed on every request before theHttpClientHandler
.protected String
getType()
Returns the type of the IG object.-
Methods inherited from class org.forgerock.openig.handler.HttpClientHandlerHeaplet
circuitBreakerFilter, configurationSupported, create, retryFilter
-
Methods inherited from class org.forgerock.openig.heap.GenericHeaplet
create, endpointRegistry, evaluatedWithHeapProperties, expression, getConfig, getHeap, getSecretService, getSecretsProvider, initialBindings, meterRegistryHolder, start
-
-
-
-
Field Detail
-
CONFIG_WEBSOCKET
public static final String CONFIG_WEBSOCKET
Constant for the configuration websocket.- See Also:
- Constant Field Values
-
-
Method Detail
-
filters
protected List<Filter> filters(org.forgerock.openig.http.spi.HttpClientLoader loader, Options options) throws HeapException
Description copied from class:HttpClientHandlerHeaplet
Returns a list ofFilter
that will be executed on every request before theHttpClientHandler
.- Specified by:
filters
in classHttpClientHandlerHeaplet
- Parameters:
loader
- theHttpClientLoader
associated to that instance.options
- the options that will be used to create theHttpClientHandler
.- Returns:
- A list of
Filter
that will be executed on every request before theHttpClientHandler
. - Throws:
HeapException
- if any error occurs during the setup of the filters.
-
getType
protected String getType()
Description copied from class:GenericHeaplet
Returns the type of the IG object.- Overrides:
getType
in classGenericHeaplet
- Returns:
- the type of the IG object
-
destroy
public void destroy()
Description copied from interface:Heaplet
Called to indicate that the object created by the heaplet is going to be dereferenced. This gives the heaplet an opportunity to free any resources that are being held prior to its dereference.- Specified by:
destroy
in interfaceHeaplet
- Overrides:
destroy
in classHttpClientHandlerHeaplet
-
-