Search in sources :

Example 1 with DefaultInterceptorChainListService

use of jp.ossc.nimbus.service.aop.DefaultInterceptorChainListService in project nimbus by nimbus-org.

the class AOPInterceptorAdaptorInterceptorService method startService.

public void startService() throws Exception {
    if (interceptorServiceName == null && interceptor == null) {
        throw new IllegalArgumentException("InterceptorServiceName or Interceptor must be specified.");
    }
    final DefaultInterceptorChainListService chainList = new DefaultInterceptorChainListService();
    if (interceptorServiceName != null) {
        chainList.setInterceptorServiceNames(new ServiceName[] { interceptorServiceName });
    } else if (interceptor != null) {
        chainList.setInterceptors(new jp.ossc.nimbus.service.aop.Interceptor[] { interceptor });
    }
    chainList.create();
    chainList.start();
    final Invoker invoker = new Invoker();
    chain = new DefaultThreadLocalInterceptorChain(chainList, invoker);
}
Also used : DefaultInterceptorChainListService(jp.ossc.nimbus.service.aop.DefaultInterceptorChainListService) DefaultThreadLocalInterceptorChain(jp.ossc.nimbus.service.aop.DefaultThreadLocalInterceptorChain)

Aggregations

DefaultInterceptorChainListService (jp.ossc.nimbus.service.aop.DefaultInterceptorChainListService)1 DefaultThreadLocalInterceptorChain (jp.ossc.nimbus.service.aop.DefaultThreadLocalInterceptorChain)1