FileDocCategorySizeDatePackage
IsLocalInterceptor.javaAPI DocJBoss 4.2.12066Fri Jul 13 21:02:26 BST 2007org.jboss.aspects.remoting

IsLocalInterceptor

public class IsLocalInterceptor extends Object implements org.jboss.aop.advice.Interceptor, Serializable
Checks to see if this object is local in VM
author
Bill Burke
version
$Revision: 57186 $

Fields Summary
private static final long
serialVersionUID
public static final IsLocalInterceptor
singleton
Constructors Summary
Methods Summary
public java.lang.StringgetName()


       return "IsLocalInterceptor"; 
public java.lang.Objectinvoke(org.jboss.aop.joinpoint.Invocation invocation)

      Object oid = invocation.getMetaData(Dispatcher.DISPATCHER, Dispatcher.OID);
      if (Dispatcher.singleton.isRegistered(oid))
      {
         org.jboss.aop.joinpoint.InvocationResponse response = Dispatcher.singleton.invoke(invocation);
         invocation.setResponseContextInfo(response.getContextInfo());
         return response.getResponse();
      }
      return invocation.invokeNext();