A concern is a stateless Fragment, shared between invocations, that acts as an interceptor of the call to the Mixin. The Concern is a Java class, that either implements the MixinType it can be used on, or java.lang.reflect.InvocationHandler which allows it to be used on any arbitrary MixinType.Concerns have many purposes, but they are not intended to produce side effects (see SideEffect). Use-cases involves;
- Transaction handling.
- Call Tracing.
- User security.
Concerns are established by the use of the @Concerns annotation on Composites.
Example
@Concerns( { TransactionConcern, UserLoginConcern } )
public class PersonComposite extends Person, Composite
{
}