org.sapia.ubik.rmi.server.command
Class AsyncCommand

java.lang.Object
  extended by org.sapia.ubik.rmi.server.command.AsyncCommand
All Implemented Interfaces:
Executable

public class AsyncCommand
extends java.lang.Object
implements Executable

Models a command that is executed asynchronously.

Author:
Yanick Duchesne
Copyright:
Copyright © 2002-2003 Sapia Open Source Software. All Rights Reserved.
License:
Read the license.txt file of the jar or visit the license page at the Sapia OSS web site

Constructor Summary
AsyncCommand(java.lang.String cmdId, VmId caller, ServerAddress from, Command cmd)
          Constructor for AsyncCommandWrapper.
 
Method Summary
 java.lang.Object execute()
          Performs this instance's logic.
 VmId getCallerVmId()
          Returns the caller's VM identifier.
 java.lang.String getCmdId()
          Returns the identifier of this command.
 Command getCommand()
          Returns this instance's wrapped command.
 ServerAddress getFrom()
          Returns the address of the server to call back, and from which this command originates.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AsyncCommand

public AsyncCommand(java.lang.String cmdId,
                    VmId caller,
                    ServerAddress from,
                    Command cmd)
Constructor for AsyncCommandWrapper.

Parameters:
the - unique identifier of this command.
from - the ServerAddress corresponding to the server to call back, and from which this command originates.
cmd - the Command instance to wrap.
Method Detail

getCmdId

public java.lang.String getCmdId()
Returns the identifier of this command.

Returns:
the identifier of this command.

getFrom

public ServerAddress getFrom()
Returns the address of the server to call back, and from which this command originates.

Returns:
a ServerAddress.

getCallerVmId

public VmId getCallerVmId()
Returns the caller's VM identifier.

Returns:
a VmId

getCommand

public Command getCommand()
Returns this instance's wrapped command.

Returns:
a Command.

execute

public java.lang.Object execute()
                         throws java.lang.Throwable
Description copied from interface: Executable
Performs this instance's logic.

Specified by:
execute in interface Executable
Returns:
null or some return value, if it applies.
Throws:
java.lang.Throwable - if an error occurs in this command's execution.
See Also:
Executable.execute()


Copyright © 2010 Sapia OSS. All Rights Reserved.