1. Proxies and Flow

router

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.


Can be used in:

bean

Syntax

<router
	exchangeStore="string"
	hotDeploy="[true,false]"
	adjustHostHeader="[true,false]"
	indentMessage="[true,false]"
	adjustContentLength="[true,false]"
	trackExchange="[true,false]" />

Sample

<beans>
<router
  exchangeStore="memoryExchangeStore"
  adjustHostHeader="true"
  indentMessage="true"
  adjustContentLength="true" />
</beans>

Attributes

NameRequiredDefaultDescriptionExample
jmx false - - -
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
- -

Child Elements

ElementsDescriptionCardinality
global Sets a global chain that applies to all requests and responses. 0..1
serviceProxy 0..*
api 0..*
soapProxy 0..*
proxy 0..*
stompProxy 0..*
internal 0..*
sslProxy 0..*

Other optional Child Elements

uriFactory, httpClientConfig, transport, serviceProxy, api, soapProxy, proxy, stompProxy, internal, sslProxy