1 28 package org.objectweb.carol.jtests.conform.interceptor.jrmp; 29 30 import java.io.Externalizable ; 31 import java.io.IOException ; 32 import java.io.ObjectInput ; 33 import java.io.ObjectOutput ; 34 35 import org.objectweb.carol.rmi.jrmp.interceptor.JServiceContext; 36 37 43 public class DummyClientServiceContext implements JServiceContext, Externalizable { 44 45 48 String address = null; 49 50 53 private int context_id; 54 55 58 public int getContextId() { 59 return context_id; 60 } 61 62 65 public DummyClientServiceContext() { 66 } 67 68 73 public DummyClientServiceContext(int context_id, String address) { 74 this.context_id = context_id; 75 this.address = address; 76 } 77 78 public String toString() { 79 return "Client Dummy Context From " + address; 80 } 81 82 86 public void readExternal(ObjectInput in) throws IOException , ClassNotFoundException { 87 context_id = in.readInt(); 88 address = (String ) in.readObject(); 89 } 90 91 95 public void writeExternal(ObjectOutput out) throws IOException { 96 out.writeInt(context_id); 97 out.writeObject(address); 98 } 99 100 } | Popular Tags |