1 7 package org.jboss.aspects.remoting.interceptors.marshall; 8 9 import org.jboss.aop.advice.Interceptor; 10 import org.jboss.aop.joinpoint.Invocation; 11 import org.jboss.aop.util.PayloadKey; 12 import org.jboss.aspects.remoting.interceptors.invoker.RemotingInterceptorFactory; 13 import org.jboss.remoting.marshal.Marshaller; 14 15 18 public class MarshallInterceptor implements Interceptor 19 { 20 private Marshaller marshaller; 21 22 public MarshallInterceptor(Marshaller marshaller) 23 { 24 this.marshaller = marshaller; 25 } 26 27 public String getName() 28 { 29 return "MarshallInterceptor"; 30 } 31 32 40 public Object invoke(Invocation invocation) throws Throwable 41 { 42 invocation.getMetaData().addMetaData(RemotingInterceptorFactory.REMOTING, 44 RemotingInterceptorFactory.MARSHALLER, marshaller, PayloadKey.TRANSIENT); 45 46 return invocation.invokeNext(); 47 } 48 } | Popular Tags |