package org.jboss.aspects.remoting.interceptors.marshall;
import org.jboss.aop.advice.Interceptor;
import org.jboss.aop.joinpoint.Invocation;
import org.jboss.aop.util.PayloadKey;
import org.jboss.aspects.remoting.interceptors.invoker.RemotingInterceptorFactory;
import org.jboss.remoting.marshal.Marshaller;
public class MarshallInterceptor implements Interceptor
{
private Marshaller marshaller;
public MarshallInterceptor(Marshaller marshaller)
{
this.marshaller = marshaller;
}
public String getName()
{
return "MarshallInterceptor";
}
public Object invoke(Invocation invocation) throws Throwable
{
invocation.getMetaData().addMetaData(RemotingInterceptorFactory.REMOTING,
RemotingInterceptorFactory.MARSHALLER, marshaller, PayloadKey.TRANSIENT);
return invocation.invokeNext();
}
}