|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sapia.ubik.rmi.server.command.Command
org.sapia.ubik.rmi.server.RMICommand
public abstract class RMICommand
This class models an executable command. Typically, a command object is created on the client side, then sent to the server where it is executed.
| Field Summary | |
|---|---|
protected Config |
_config
|
protected VmId |
_vmId
|
| Constructor Summary | |
|---|---|
RMICommand()
|
|
| Method Summary | |
|---|---|
abstract java.lang.Object |
execute()
Executes this command. |
Connection |
getConnection()
Returns this command's connection. |
ServerAddress |
getServerAddress()
Returns this command's target server address, which corresponds to the server that received this command. |
VmId |
getVmId()
Returns the identifier of the VM from which this command comes from. |
void |
init(Config config)
Initializes this instance with a CommandConfig upon its
arrival at the server. |
void |
readExternal(java.io.ObjectInput in)
|
void |
writeExternal(java.io.ObjectOutput out)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected transient Config _config
protected VmId _vmId
| Constructor Detail |
|---|
public RMICommand()
| Method Detail |
|---|
public void init(Config config)
CommandConfig upon its
arrival at the server. It is a server's responsability to call this
method once it receives a command.
When overriding this method, super.init(config) must
be called. If a command nests another one, it should also call
init() on the nested command.
config - CommandConfigpublic VmId getVmId()
VmId.public ServerAddress getServerAddress()
ServerAddresspublic final Connection getConnection()
Connection
public abstract java.lang.Object execute()
throws java.lang.Throwable
execute in interface Executableexecute in class Commandjava.lang.Throwable - if an error occurs while executing this command
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablejava.io.IOException
java.lang.ClassNotFoundExceptionExternalizable.readExternal(ObjectInput)
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOExceptionExternalizable.writeExternal(ObjectOutput)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||