1 22 package org.jboss.proxy; 23 24 import java.io.Externalizable ; 25 import java.io.IOException ; 26 import java.io.ObjectInput ; 27 import java.io.ObjectOutput ; 28 import org.jboss.invocation.Invocation; 29 30 36 public abstract class Interceptor 37 implements Externalizable 38 { 39 40 private static final long serialVersionUID = 4358098404672505200L; 41 42 43 protected Interceptor nextInterceptor; 44 45 53 public Interceptor setNext(final Interceptor interceptor) { 54 nextInterceptor = interceptor; 56 return interceptor; 57 } 58 59 public Interceptor getNext() { 60 return nextInterceptor; 61 } 62 63 public abstract Object invoke(Invocation mi) throws Throwable ; 64 65 68 public void writeExternal(final ObjectOutput out) 69 throws IOException 70 { 71 out.writeObject(nextInterceptor); 72 } 73 74 77 public void readExternal(final ObjectInput in) 78 throws IOException , ClassNotFoundException 79 { 80 nextInterceptor = (Interceptor)in.readObject(); 81 } 82 } 83 | Popular Tags |