ostore.util
Class QueueElementRespIF

java.lang.Object
  |
  +--ostore.util.QueueElementRespIF
All Implemented Interfaces:
QueueElementIF

public abstract class QueueElementRespIF
extends Object
implements QueueElementIF

QueueElementRespIF is the superclass of the logical and well defined response to an initial corresponding request event.

Version:
$Id: QueueElementRespIF.java,v 1.1 2004/03/23 08:21:52 hweather Exp $
Author:
Hakim Weatherspoon
See Also:
QueueElementReqIF, QueueElementIF

Field Summary
protected  int error
          One of the error codes defined by the subclass (or NO_ERROR).
static int NO_ERROR
          An error code that indicates no error occurred.
 Object userData
          Requestor defined object to be returned in the resp.
 
Constructor Summary
QueueElementRespIF(int e, Object u)
          Constructor: Creates a new QueueElementReqIF.
 
Method Summary
protected  void BUG(String msg)
          BUG outputs a fatal error msg, then terminates the proces.
 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

error

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


userData

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

Constructor Detail

QueueElementRespIF

public QueueElementRespIF(int e,
                          Object u)
Constructor: Creates a new QueueElementReqIF.

Parameters:
e - One of the error codes defined by the subclass (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

BUG

protected void BUG(String msg)
BUG outputs a fatal error msg, then terminates the proces.