1 22 package org.jboss.ejb3.test.clientinterceptor; 23 24 import java.io.Serializable ; 25 26 import org.jboss.aop.advice.Interceptor; 27 import org.jboss.aop.joinpoint.Invocation; 28 import org.jboss.aop.util.PayloadKey; 29 import org.jboss.ejb3.interceptor.ClientInterceptorUtil; 30 31 36 public class CustomInterceptor implements Interceptor, Serializable 37 { 38 public String getName() 39 { 40 return "CustomInterceptor"; 41 } 42 43 public Object invoke(Invocation invocation) throws Throwable 44 { 45 ClientInterceptorUtil.addMetadata(invocation, "as_is", "AS_IS", PayloadKey.AS_IS); 46 ClientInterceptorUtil.addMetadata(invocation, "marshalled", new NeedsMarshallingValue("NEEDS MARSHALLING")); 47 48 return invocation.invokeNext(); 49 } 50 } 51 | Popular Tags |