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 42 public class DummyServerServiceContext implements JServiceContext, Externalizable { 43 44 47 String address = null; 48 49 52 private int context_id; 53 54 57 public int getContextId() { 58 return context_id; 59 } 60 61 64 public DummyServerServiceContext() { 65 } 66 67 72 public DummyServerServiceContext(int context_id, String address) { 73 this.context_id = context_id; 74 this.address = address; 75 } 76 77 public String toString() { 78 return "Server Dummy Context From " + address; 79 } 80 81 85 public void readExternal(ObjectInput in) throws IOException , ClassNotFoundException { 86 context_id = in.readInt(); 87 address = (String ) in.readObject(); 88 } 89 90 94 public void writeExternal(ObjectOutput out) throws IOException { 95 out.writeInt(context_id); 96 out.writeObject(address); 97 } 98 } | Popular Tags |