1 22 package org.jboss.aspects.remoting; 23 24 import org.jboss.aop.Dispatcher; 25 31 public class IsLocalInterceptor implements org.jboss.aop.advice.Interceptor, java.io.Serializable 32 { 33 private static final long serialVersionUID = 8067347185395345001L; 34 35 public static final IsLocalInterceptor singleton = new IsLocalInterceptor(); 36 37 public String getName() { return "IsLocalInterceptor"; } 38 39 public Object invoke(org.jboss.aop.joinpoint.Invocation invocation) throws Throwable 40 { 41 Object oid = invocation.getMetaData(Dispatcher.DISPATCHER, Dispatcher.OID); 42 if (Dispatcher.singleton.isRegistered(oid)) 43 { 44 org.jboss.aop.joinpoint.InvocationResponse response = Dispatcher.singleton.invoke(invocation); 45 invocation.setResponseContextInfo(response.getContextInfo()); 46 return response.getResponse(); 47 } 48 return invocation.invokeNext(); 49 } 50 } 51 | Popular Tags |