Package interlok.management.proxy
Class ProxyMgmtComponent
java.lang.Object
com.adaptris.core.management.MgmtComponentImpl
interlok.management.proxy.ProxyMgmtComponent
- All Implemented Interfaces:
ManagementComponent
Management Component that allows you to proxy various HTTP requests internally.
The use case for this is something like Heroku which generally only allows you to expose a single external port. If you have an existing API endpoint listening via embedded jetty and you have also require jolokia then you need to jump through additional hoops to make this possible (it could be done by having an additional API endpoint workflow that proxies everything to the jolokia endpoint). This is a very simplified proxy simply passes through all headers as-is to the proxied URL.
If we take the following configuration (note the use of :: as the separator) :-
interlok.proxy.1=/jolokia::http://localhost:8081
interlok.proxy.2=/alternate::http://my.other.host:8082
In this case we would register as a listener against the URI /jolokia/* and /alternate/* against the embedded jetty
component. All traffic to our registered URI (e.g. http://localhost:8080/jolokia/my/jolokia/action) would be forwarded to the
corresponding server/port combination (http://localhost:8081/jolokia/my/jolokia/action).
-
Field Summary
Fields inherited from class com.adaptris.core.management.MgmtComponentImpl
log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected List<StandaloneConsumer>build(Properties config) voiddestroy()voidinit(Properties config) voidstart()voidstop()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.adaptris.core.management.ManagementComponent
setClassLoader