Source code: org/jbpm/util/experimental/container/Aspect.java
1 package org.jbpm.util.experimental.container;
2
3 /**
4 * is a decorator for services, also known as
5 * interceptor (jboss) or filter (servlets).
6 * <p>An Aspect-implementation must have the following
7 * constructor : Constructor( Container, Configuration ) throws DependancyException, ConfigurationException;
8 * </p>
9 * <p>Aspects can be chained. Note that in a chain
10 * the postInvocations are called in the opposite
11 * order then the preInvocations.
12 * </p>
13 */
14 public interface Aspect extends Configurable, Removable {
15
16 /**
17 * is executed between the client call and the
18 * service-method invocation on the actual service object
19 * that implements the service.
20 */
21 void preInvocation( ServiceInvocation serviceInvocation );
22
23 /**
24 * is executed after the service object performed the
25 * service method and before the result is given back to the
26 * client.
27 */
28 void postInvocation( ServiceInvocation serviceInvocation, Throwable t );
29 }