In AOP terms, interception scope is equivalent to the point cuts. The interception scope limits the Message Exchanges intercepted by an interceptor.
The interception scope is defined by interceptor configuration properties, these being :
| Property | Filter Message Exchange based on |
|---|---|
| provider | service provider |
| consumer | service consumer |
| message | message type : ( "in", "out") |
| service | service name, can be the local name or the fully qualified service name |
| endpoint | endpoint name |
| status | message exchange status : {"DONE", "ERROR", "ACTIVE"} |
These filter properties are set as properties on the Intercept Annotation
.
All ACTIVE message exchanges will be intercepted.
@Intercept (status="ACTIVE")
public void anInterceptor(...){}
All message exchanges where service="notify-transit" and endpoint="transit_inbound" will be intercepted
@Intercept (service="notify-transit", endpoint="transit_inbound")
public void anInterceptor(...){}
If a application has endpoint links,then both the sides of the link are considered for matching the service/endpoint name.
All message exchanges from "sun-http-binding" to "sun-bpel-engine" will be intercepted.
@Intercept (consumer="sun-http-binding", provider="sun-bpel-engine")
public void anInterceptor(...){}
All incoming messages will be intercepted
@Intercept (message="in")
public void anInterceptor(...){}
If none of the filter properties are set on an interceptor, then it is never in scope. If one or more property is configured, the interceptor is fired for all message exchanges which match the set properties.