Membrane API Gateway's main object.
The router is a Spring Lifecycle object: It is automatically started and stopped according to the Lifecycle of the Spring Context containing it. In Membrane's standard setup (standalone or in a J2EE web app), Membrane itself controls the creation of the Spring Context and its Lifecycle.
In this case, the router is hot deployable: It can monitor proxies.xml, the Spring configuration file, for changes and reinitialize the Spring Context, when a change is detected. Note that, during the Spring Context restart, the router object itself along with almost all other Membrane objects (interceptors, etc.) will be recreated.
<router
exchangeStore="string"
hotDeploy="[true,false]"
adjustHostHeader="[true,false]"
indentMessage="[true,false]"
adjustContentLength="[true,false]"
trackExchange="[true,false]" />
<beans>
<router
exchangeStore="memoryExchangeStore"
adjustHostHeader="true"
indentMessage="true"
adjustContentLength="true" />
</beans>
Name | Required | Default | Description | Example |
---|---|---|---|---|
jmx | false | - | Sets the JMX name for this router. Also declare a global instance.
|
- |
retryInitInterval | false | 5 minutes |
number of milliseconds after which reinitialization of s should be attempted periodically
|
- |
production | false | false |
- | - |
hotDeploy | false | true |
Whether changes to the router's configuration file should automatically trigger a restart. Monitoring the router's configuration file proxies.xml is only possible, if the router is created by a Spring Application Context which supports monitoring. |
- |
exchangeStore | false | create a {@link LimitedMemoryExchangeStore} limited to the size of 1 MB. |
Spring Bean ID of an {@link ExchangeStore}. The exchange store will be used by this router's components ({@link AdminConsoleInterceptor}, {@link ExchangeStoreInterceptor}, etc.) by default, if no other exchange store is explicitly set to be used by them.
|
- |
retryInit | false | false |
- | - |
Elements | Description | Cardinality |
---|---|---|
uriFactory | Sets the URI factory used by the router. Use this only, if you need to allow special (off-spec) characters in URLs which are not supported by java.net.URI . | 0..1 |
httpClientConfig | A 'global' (per router) . This instance is used everywhere a HTTP Client is used. Usually, in every specific place, you can still configure a local (with higher precedence compared to this global instance). | 0..1 |
transport | Used to override the default 'transport' chain. The transport chain is the one global interceptor chain called *for every* incoming HTTP Exchanges. The transport chain uses to call 'down' to a specific , or similar. The default transport chain is shown in proxies-full-sample.xml . | 0..1 |
global | Sets a global chain that applies to all requests and responses. | 0..1 |