package org.jboss.aspects.remoting.interceptors.invoker;
import org.jboss.aop.advice.Interceptor;
import org.jboss.aop.joinpoint.Invocation;
public class InvokerInterceptor implements Interceptor
{
public String getName()
{
return "InvokerInterceptor";
}
public Object invoke(Invocation invocation) throws Throwable
{
Object ret = null;
Invocation newInvocation = RemotingInterceptorFactory.injectRemotingInterceptors(invocation);
if (newInvocation != null)
{
ret = newInvocation.invokeNext();
}
else
{
throw new RuntimeException("Could not make invocation due to new invocation object being null.");
}
return ret;
}
}