1 package org.sapia.ubik.rmi.server.gc; 2 3 import org.sapia.ubik.rmi.server.*; 4 5 import java.io.IOException ; 6 import java.io.ObjectInput ; 7 import java.io.ObjectOutput ; 8 9 10 17 public class CommandRefer extends RMICommand { 18 private OID _oid; 19 20 21 public CommandRefer() { 22 } 23 24 30 public CommandRefer(OID oid) { 31 _oid = oid; 32 } 33 34 37 public Object execute() throws Throwable { 38 Hub.serverRuntime.gc.reference(_vmId, _oid); 39 40 return null; 41 } 42 43 46 public void readExternal(ObjectInput in) 47 throws IOException , ClassNotFoundException { 48 super.readExternal(in); 49 _oid = (OID) in.readObject(); 50 } 51 52 55 public void writeExternal(ObjectOutput out) throws IOException { 56 super.writeExternal(out); 57 out.writeObject(_oid); 58 } 59 } 60 | Popular Tags |