1 package org.sapia.ubik.rmi.server.command; 2 3 import org.sapia.ubik.net.ServerAddress; 4 import org.sapia.ubik.rmi.server.VmId; 5 6 7 17 public class AsyncCommand implements Executable { 18 private String _cmdId; 19 private VmId _caller; 20 private ServerAddress _from; 21 private Command _cmd; 22 private Object _response; 23 24 32 public AsyncCommand(String cmdId, VmId caller, ServerAddress from, Command cmd) { 33 _cmdId = cmdId; 34 _from = from; 35 _cmd = cmd; 36 _caller = caller; 37 } 38 39 44 public String getCmdId() { 45 return _cmdId; 46 } 47 48 54 public ServerAddress getFrom() { 55 return _from; 56 } 57 58 63 public VmId getCallerVmId() { 64 return _caller; 65 } 66 67 72 public Command getCommand() { 73 return _cmd; 74 } 75 76 79 public Object execute() throws Throwable { 80 return _cmd.execute(); 81 } 82 } 83 | Popular Tags |