transport
The transport receives messages from clients and invokes interceptors in the request and response flow. The interceptors that are engaged with the transport are global and are invoked for each message flowing through the router.
Can be used in
Syntax
<transport coreThreadPoolSize="integer" socketTimeout="integer" tcpNoDelay="[true,false]" httpClientRetries="integer" autoContinue100Expected="[true,false]" printStackTrace="[true,false]"> <interceptors> [interceptors]* </interceptors> </transport>
Listing 1: transport Syntax
Sample
<beans> <transport coreThreadPoolSize="20"> <ruleMatching /> <dispatching /> <userFeature /> <transform xslt="strip.xslt" /> <wsdlRewriter /> <httpClient /> </transport> </beans>
Listing 2: transport Example
Attributes
Name | Mandatory | Default | Description | Example |
---|---|---|---|---|
coreThreadPoolSize | no | 20 |
Membrane uses a thread pool to allocate threads to incomming clients connections. The core thread pool size is the minimum number of threads that are created in advance to serve client requests. |
5 |
socketTimeout | no | 30000 | Socket timout in ms. | 60000 |
tcpNoDelay | no | true | true | |
httpClientRetries | no | 5 | Determines how often Membrane tries to send a message to a target before it gives up and returns an error message to the client. | 10 |
autoContinue100Expected | no | true | Whether the HTTP request body should always immediately be requested from the client, if the client sent "Expect: 100-continue" and held back sending the body. As some interceptors need to examine the request body, the recommended value is "true". | true |
printStackTrace | no | false | Whether the stack traces of exceptions thrown by interceptors should be returned in the HTTP response. | true |
Child Elements
Name | Cardinality | Description |
---|---|---|
ruleMatching | 1 | Selects the matching rule for incoming request. |
dispatching | 1 | Dispatches requests to target hosts. |
basicAuthentication | 0..1 | HTTP Basic Authentication interceptor |
clusterNotification | 0..1 | Up/down push interface interceptor for cluster managment |
counter | 0..* | Interceptor that provides a test web site. |
rewriter | 0..* | Interceptor to rewrite URLs. |
adminConsole | 0..1 | Initializes the Admin Console. |
webServer | 0..1 | Web Server Interceptor |
switch | 0..* | Interceptor for content based routing. |
accessControl | 0..1 | Interceptor to restrict access to services and resources. |
exchangeStore | 0..* | Interceptor that stores exchanges. |
groovy | 0..* | Runs Groovy scripts. |
log | 0..* | Logs request and response. |
statisticsCSV | 0..* | Interceptor that logs in a CSV file. |
statisticsJDBC | 0..* | Interceptor that logs in a database. |
throttle | 0..* | Interceptor that delays and limits requests. |
formValidation | 0..* | Interceptor that validates form parameter. |
transform | 0..* | Interceptor that applies XSLT transformations |
balancer | 0..1 | LoadBalancerInterceptor |
validator | 0..* | Interceptor that validates against a WSDL and referenced schemas |
rest2Soap | 0..* | Interceptor that exposes a SOAP service as REST resource. |
regExReplacer | 0..* | Interceptor that replaces parts of the content based on a regulare expression. |
userFeature | 1 | Runs interceptors from proxies. |
client | 1 | Connects to server and sends requests. |
wsdlRewriter | 0..1 | Interceptor that rewrites URLs in an endpoint and import definitions of a WSDL. |