1 22 package org.jboss.ejb3.stateful; 23 24 import java.io.IOException ; 25 import java.io.ObjectInput ; 26 import java.io.ObjectOutput ; 27 import java.lang.reflect.Method ; 28 import org.jboss.aop.Advisor; 29 import org.jboss.aop.advice.Interceptor; 30 import org.jboss.aop.joinpoint.Invocation; 31 import org.jboss.aop.joinpoint.MethodInvocation; 32 33 39 public class StatefulRemoteInvocation extends MethodInvocation implements java.io.Externalizable 40 { 41 protected Object id; 42 43 44 public StatefulRemoteInvocation(Interceptor[] interceptors, long methodHash, Method advisedMethod, Method unadvisedMethod, Advisor advisor, Object id) 45 { 46 super(interceptors, methodHash, advisedMethod, unadvisedMethod, advisor); 47 this.id = id; 48 } 49 50 public StatefulRemoteInvocation() 51 { 52 } 53 54 public Object getId() 55 { 56 return id; 57 } 58 59 public Invocation getWrapper(Interceptor[] newchain) 60 { 61 throw new RuntimeException ("NOT IMPLEMENTED"); 62 } 63 64 public Invocation copy() 65 { 66 throw new RuntimeException ("NOT IMPLEMENTED"); 67 } 68 69 public void writeExternal(ObjectOutput out) throws IOException 70 { 71 super.writeExternal(out); 72 out.writeObject(id); 73 } 74 75 public void readExternal(ObjectInput in) throws IOException , ClassNotFoundException 76 { 77 super.readExternal(in); 78 id = in.readObject(); 79 } 80 81 public String toString() 82 { 83 StringBuffer sb = new StringBuffer (100); 84 sb.append("["); 85 sb.append("id=").append(id); 86 sb.append(", MethodInvocation=").append(super.toString()); 87 sb.append("]"); 88 return sb.toString(); 89 } 90 91 } 92 | Popular Tags |