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

java.lang.Object
  extended by org.sapia.ubik.rmi.server.command.Response
All Implemented Interfaces:
java.io.Serializable, Executable

public class Response
extends java.lang.Object
implements Executable, java.io.Serializable

Models a "response": i.e.: the return value of an asynchronous call-back. An instance of this class in fact encapsulate the return value itself, plus the command identifier of the response at the originating host.

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
See Also:
Serialized Form

Constructor Summary
Response(java.lang.String cmdId, java.lang.Object response)
          Constructor for Response.
 
Method Summary
 java.lang.Object execute()
          Performs this instance's logic.
 java.lang.Object get()
          This response's return value.
 java.lang.String getId()
          Returns the command identifier that this response corresponds to.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Response

public Response(java.lang.String cmdId,
                java.lang.Object response)
Constructor for Response.

Method Detail

getId

public java.lang.String getId()
Returns the command identifier that this response corresponds to.

Returns:
a command identifier.

get

public java.lang.Object get()
This response's return value.

Returns:
an Object or null if the return value of the original asynchronous call-back is null.

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()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2010 Sapia OSS. All Rights Reserved.