interceptor
Can be used in
proxy, serviceProxy, soapProxy, transport
Syntax
<interceptor refid="string" name="string" />
Listing 1: interceptor Syntax
Sample
Assume that an interceptor is definied as Spring bean in the monitor-beans.xml file.
<spring:beans xmlns:spring="http://www.springframework.org/schema/beans" ...> ... <spring:bean id="myInterceptor" class="com.predic8.MyInterceptor"> <spring:property name="myProperty" value="value"/> </spring:bean> </spring:beans>
Listing 2: Custom Interceptor Defined in monitor-beans.xml
The following serviceProxy uses the interceptor element to reference the custom interceptor from the monitor-beans.xml file.
<serviceProxy port="2000"> <interceptor refid="myInterceptor" /> </serviceProxy>
Listing 3: ServiceProxy Referencing a Custom Interceptor from monitor-beans.xml
Attributes
Name | Mandatory | Default | Description | Example |
---|---|---|---|---|
refid | yes | - | Bean id of the referenced interceptor. | myInterceptor |
name | no | Default name of interceptor | Overrides interceptor name. | Custom XSLT Transformer |
See Also
You can find a example how to create a custom interceptor in the examples/custom-interceptor directory in your Membrane distribution.