1 7 package org.jboss.invocation; 8 9 import java.io.Externalizable ; 10 import java.io.IOException ; 11 import java.io.ObjectInput ; 12 import java.io.ObjectOutput ; 13 14 25 public class ByValueInvokerInterceptor 26 extends InvokerInterceptor 27 implements Externalizable 28 { 29 30 private static final long serialVersionUID = -6402069656713307195L; 31 32 public ByValueInvokerInterceptor() 33 { 34 } 36 37 39 42 public boolean isLocal(Invocation invocation) 43 { 44 InvocationType type = invocation.getType(); 45 if (type == InvocationType.LOCAL || type == InvocationType.LOCALHOME) 46 return true; 47 return false; 48 } 49 50 53 public Object invoke(Invocation invocation) 54 throws Exception 55 { 56 if (isLocal(invocation)) 58 return localInvoker.invoke(invocation); 60 else 61 return invocation.getInvocationContext().getInvoker().invoke(invocation); 63 } 64 65 68 public void writeExternal(final ObjectOutput out) 69 throws IOException 70 { 71 } 73 74 77 public void readExternal(final ObjectInput in) 78 throws IOException , ClassNotFoundException 79 { 80 } 82 83 85 } 87 | Popular Tags |