org.sapia.ubik.mcast
Class Response

java.lang.Object
  extended by org.sapia.ubik.mcast.Response
All Implemented Interfaces:
java.io.Serializable

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

Models a synchronous response to a remote event.

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:
EventChannel.send(ServerAddress, String, Object), EventChannel.send(String, Object), Response, Serialized Form

Field Summary
static int STATUS_OK
          Corresponds to the OK status, signifying that the response was returned normally.
static int STATUS_SUSPECT
          Indicates that the remote node corresponding to this instance is probably down.
 
Method Summary
 java.lang.Object getData()
          Returns the data held by this instance.
 int getStatus()
          Returns this instance's status.
 java.lang.Throwable getThrowable()
          Returns the Throwable held within this response.
 boolean isError()
          Returns true if this instance contains a Throwable.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

STATUS_OK

public static final int STATUS_OK
Corresponds to the OK status, signifying that the response was returned normally.

See Also:
Constant Field Values

STATUS_SUSPECT

public static final int STATUS_SUSPECT
Indicates that the remote node corresponding to this instance is probably down.

See Also:
Constant Field Values
Method Detail

isError

public boolean isError()
Returns true if this instance contains a Throwable.


getThrowable

public java.lang.Throwable getThrowable()
Returns the Throwable held within this response.

Returns:
a Throwable
See Also:
isError()

getData

public java.lang.Object getData()
Returns the data held by this instance.

Returns:
an Object, or null if this response has no data.

getStatus

public int getStatus()
Returns this instance's status.

See Also:
STATUS_OK, STATUS_SUSPECT

toString

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


Copyright © 2010 Sapia OSS. All Rights Reserved.