dd.api
Class DDPublishResp

java.lang.Object
  |
  +--dd.api.DDPublishResp
All Implemented Interfaces:
QueueElementIF

public class DDPublishResp
extends Object
implements QueueElementIF

Respond to a request for a object guid's pointer set, with an array of PublishInfos and whether or not we're the root for that guid.

Version:
$Id: DDPublishResp.java,v 1.4 2004/05/03 08:53:09 hweather Exp $
Author:
Hakim Weatherspoon

Field Summary
protected  int error
          One of the error codes defined (or NO_ERROR).
static String[] ERROR_STRING
          String representation of error.
static int NO_ERROR
          An error code that indicates no error occurred.
 SecureHash objguid
          The object guid published.
 boolean publish
          Flag indicating whether request was a publish or unpublish.
 SecureHash root
          The node where the publish was handled.
 DDTag tag
          The object tag published.
static int TIMEOUT_ERROR
          An error code that timeout.
 Object userData
          Requestor defined object to be returned in the resp.
 
Constructor Summary
DDPublishResp(SecureHash g, DDTag t, SecureHash r, boolean p, int e, Object u)
          Constructor: Creates a new DDPublishResp.
 
Method Summary
 int getErrorCode()
          getErrorCode returns the error code.
 boolean successful()
          successful returns true iff getErrorCode() == NO_ERROR.
 String toString()
          Specified by java.lang.Object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NO_ERROR

public static final int NO_ERROR
An error code that indicates no error occurred.

See Also:
Constant Field Values

TIMEOUT_ERROR

public static final int TIMEOUT_ERROR
An error code that timeout.

See Also:
Constant Field Values

ERROR_STRING

public static final String[] ERROR_STRING
String representation of error.


objguid

public SecureHash objguid
The object guid published.


tag

public DDTag tag
The object tag published.


root

public SecureHash root
The node where the publish was handled.


publish

public boolean publish
Flag indicating whether request was a publish or unpublish.


error

protected int error
One of the error codes defined (or NO_ERROR).


userData

public Object userData
Requestor defined object to be returned in the resp.

Constructor Detail

DDPublishResp

public DDPublishResp(SecureHash g,
                     DDTag t,
                     SecureHash r,
                     boolean p,
                     int e,
                     Object u)
Constructor: Creates a new DDPublishResp.

Parameters:
g - guid of object published.
t - tag of object to published.
r - node where the publish was handled.
p - Flag indicating whether request was a publish or unpublish.
e - One of the error codes defined (or NO_ERROR).
u - Requestor defined object to be returned in the resp.
Method Detail

successful

public boolean successful()
successful returns true iff getErrorCode() == NO_ERROR.

Returns:
true iff getErrorCode() == NO_ERROR.

getErrorCode

public int getErrorCode()
getErrorCode returns the error code.

Returns:
the error code.

toString

public String toString()
Specified by java.lang.Object

Overrides:
toString in class Object