interceptor


Can be used in:

serviceProxy, api, stompProxy, swaggerProxy, if, registration, wsStompReassembler, interceptor, bean, internalProxy, transport and soapProxy

Syntax

<interceptor refid="string" name="string" />

Sample

Assume that an interceptor is definied as Spring bean.

<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>
Custom Interceptor Defined in monitor-beans.xml

The following serviceProxy uses the interceptor element to reference the custom interceptor.

<serviceProxy port="2000">
  <interceptor refid="myInterceptor" />
</serviceProxy>
ServiceProxy Referencing a Custom Interceptor from monitor-beans.xml

Attributes

NameRequiredDefaultDescriptionExample
refid false - Spring bean id of the referenced interceptor. myInterceptor

Other optional Child Elements


wsdlRewriter, headerFilter, switch, accessControl, index, return, userFeature, http2xml, gatekeeper, oauth2PermissionChecker, regExReplacer, webServer, jsonPointerExtractor, json2Xml, adminConsole, xml2Json, apiKey, oauth2Resource, jwtAuth, cache, oauth2authserver, xenAuthentication, acmeHttpChallenge, analyser, reverseProxying, graphQLProtection, validator, clamav, wsdlPublisher, greaser, statisticsProvider, log, setProperty, APIsJSON, webSocket, soap2Rest, groovyTemplate, wadlRewriter, routerIpResolver, statisticsJDBC, prometheus, setHeader, swaggerRewriter, static, urlNormalizer, openTelemetry, interceptor, soapOperationExtractor, shadowing, basicAuthentication, authHead2Body, ruleMatching, rest2Soap, javascript, balancer, accessLog, apiDocs, if, kubernetesValidation, sampleSoapService, rewriter, clusterNotification, rateLimiter, login, swaggerApiKeyRequirer, requireAuth, spdy, statisticsCSV, accountRegistration, tcp, flowInitiator, counter, paddingHeader, transform, methodOverride, tokenValidator, soapStackTraceFilter, logContext, formValidation, apiKeyChecker, shutdown, xpathExtractor, limit, apiManagement, xmlContentFilter, beautifier, replace, template, xmlProtection, exchangeStore, throttle, testService, jsonProtection, stompClient, oauth2Resource2, ntlm, webServiceExplorer, httpClient, groovy, dispatching

See Also

You can find a example how to create a custom interceptor in the examples/custom-interceptor directory in your Membrane distribution.