/** * Test if the interceptor is applicable. * @return True, if applicable. */ public boolean isApplicable(ServiceInvocationContext context) { // if(!getComponent().isComponentThread()) // System.out.println("not on comp: "+context.getMethod().toString()); // throw new RuntimeException("Must be called on component thread: "+Thread.currentThread()); return getComponent().isComponentThread(); }
/** * Test if the interceptor is applicable. * @return True, if applicable. */ public boolean isApplicable(ServiceInvocationContext context) { return super.isApplicable(context) && context.getMethod().equals(METHOD); }
/** * Test if the interceptor is applicable. * @return True, if applicable. */ public boolean isApplicable(ServiceInvocationContext context) { return super.isApplicable(context) && context.getMethod().equals(METHOD); }
/** * Test if the interceptor is applicable. * @return True, if applicable. */ public boolean isApplicable(ServiceInvocationContext context) { // if(!getComponent().isComponentThread()) // System.out.println("not on comp: "+context.getMethod().toString()); // throw new RuntimeException("Must be called on component thread: "+Thread.currentThread()); return getComponent().getComponentFeature(IExecutionFeature.class).isComponentThread(); }
/** * Test if the interceptor is applicable. * @return True, if applicable. */ public boolean isApplicable(ServiceInvocationContext context) { // Interceptor is used in both chains, provided and required // if(context.getMethod().getName().indexOf("methodA")!=-1) // System.out.println("interceptor: "+component.getComponentIdentifier()); // boolean ret = component.getServiceContainer().hasMethodListeners(sid, new MethodInfo(context.getMethod())); boolean ret = super.isApplicable(context) && container.hasMethodListeners(sid, new MethodInfo(context.getMethod())); // System.out.println("app: "+context.getMethod().getName()+" "+ret); return ret; }
boolean ret = super.isApplicable(context);
boolean ret = super.isApplicable(context);
/** * Test if the interceptor is applicable. * @return True, if applicable. */ public final boolean isApplicable(ServiceInvocationContext context) { boolean ret = false; if(super.isApplicable(context)) { Boolean app = applicables.get(context.getMethod()); if(app!=null) { ret = app.booleanValue(); } else { ret = customIsApplicable(context); applicables.put(context.getMethod(), ret? Boolean.TRUE: Boolean.FALSE); } } return ret; }
/** * Test if the interceptor is applicable. * @return True, if applicable. */ public final boolean isApplicable(ServiceInvocationContext context) { boolean ret = false; if(super.isApplicable(context)) { Boolean app = applicables.get(context.getMethod()); if(app!=null) { ret = app.booleanValue(); } else { ret = customIsApplicable(context); applicables.put(context.getMethod(), ret? Boolean.TRUE: Boolean.FALSE); } } return ret; }
/** * Test if the interceptor is applicable. * @return True, if applicable. */ public boolean isApplicable(ServiceInvocationContext context) { // Interceptor is used in both chains, provided and required // if(context.getMethod().getName().indexOf("methodA")!=-1) // System.out.println("interceptor: "+component.getComponentIdentifier()); // boolean ret = component.getServiceContainer().hasMethodListeners(sid, new MethodInfo(context.getMethod())); boolean ret = super.isApplicable(context) && getComponent().getComponentFeature(IProvidedServicesFeature.class).hasMethodListeners(sid, new MethodInfo(context.getMethod())); // System.out.println("app: "+context.getMethod().getName()+" "+ret); return ret; }