context.arch.util
Class Error

java.lang.Object
  |
  +--context.arch.util.Error

public class Error
extends java.lang.Object

This class is a container for an error


Field Summary
static java.lang.String DUPLICATE_ERROR
          Tag if a request is a duplicate
static java.lang.String EMPTY_RESULT_ERROR
          Error tag for no results
static java.lang.String ERROR_CODE
          Tag for the name of the callback
static java.lang.String INCOMPLETE_DATA_ERROR
          Tag if the data being requested can not be fully returned
static java.lang.String INVALID_ATTRIBUTE_ERROR
          Tag if an attribute being requested is not valid
static java.lang.String INVALID_CALLBACK_ERROR
          Tag if a callback being subscribed to is not valid
static java.lang.String INVALID_DATA_ERROR
          Tag if the data being requested is not valid
static java.lang.String INVALID_ID_ERROR
          Tag if the given doesn't match the receiving component's id
static java.lang.String INVALID_REQUEST_ERROR
          Error tag for invalid request
static java.lang.String INVALID_REQUEST_ID_ERROR
          Tag if a service request id is unknown
static java.lang.String INVALID_TIMING_ERROR
          Tag if a service timing is incorrect (synchronous vs asynchronous
static java.lang.String MISSING_PARAMETER_ERROR
          Tag if a parameter to a method is missing
static java.lang.String NO_ERROR
          Tag for no errors
static java.lang.String UNKNOWN_CALLBACK_ERROR
          Tag if the callback is not known in the receiving component
static java.lang.String UNKNOWN_FUNCTION_ERROR
          Tag if a service function requested does not exist
static java.lang.String UNKNOWN_METHOD_ERROR
          Tag if the method is not known in the receiving component
static java.lang.String UNKNOWN_SERVICE_ERROR
          Tag if a service requested does not exist
static java.lang.String UNKNOWN_SUBSCRIBER_ERROR
          Tag if the subscriber in the message is unknown
static java.lang.String UNKNOWN_SUBSCRIPTION_ERROR
          Tag if a request is for an invalid subscription
 
Constructor Summary
Error()
          Empty constructor
Error(DataObject data)
          Constructor that takes a DataObject holding the error info The DataObject is expected to contain the tag.
Error(java.lang.String err)
          Constructor that takes an error string
 
Method Summary
 java.lang.String getError()
          Returns the error string
 void setError(java.lang.String err)
          Sets the error string
 DataObject toDataObject()
          This method converts the Error object to a DataObject
 java.lang.String toString()
          Returns a printable version of this class
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ERROR_CODE

public static final java.lang.String ERROR_CODE
Tag for the name of the callback

NO_ERROR

public static final java.lang.String NO_ERROR
Tag for no errors

EMPTY_RESULT_ERROR

public static final java.lang.String EMPTY_RESULT_ERROR
Error tag for no results

INVALID_REQUEST_ERROR

public static final java.lang.String INVALID_REQUEST_ERROR
Error tag for invalid request

INVALID_ID_ERROR

public static final java.lang.String INVALID_ID_ERROR
Tag if the given doesn't match the receiving component's id

MISSING_PARAMETER_ERROR

public static final java.lang.String MISSING_PARAMETER_ERROR
Tag if a parameter to a method is missing

UNKNOWN_SUBSCRIBER_ERROR

public static final java.lang.String UNKNOWN_SUBSCRIBER_ERROR
Tag if the subscriber in the message is unknown

UNKNOWN_CALLBACK_ERROR

public static final java.lang.String UNKNOWN_CALLBACK_ERROR
Tag if the callback is not known in the receiving component

UNKNOWN_METHOD_ERROR

public static final java.lang.String UNKNOWN_METHOD_ERROR
Tag if the method is not known in the receiving component

INVALID_DATA_ERROR

public static final java.lang.String INVALID_DATA_ERROR
Tag if the data being requested is not valid

INCOMPLETE_DATA_ERROR

public static final java.lang.String INCOMPLETE_DATA_ERROR
Tag if the data being requested can not be fully returned

INVALID_ATTRIBUTE_ERROR

public static final java.lang.String INVALID_ATTRIBUTE_ERROR
Tag if an attribute being requested is not valid

INVALID_CALLBACK_ERROR

public static final java.lang.String INVALID_CALLBACK_ERROR
Tag if a callback being subscribed to is not valid

UNKNOWN_SERVICE_ERROR

public static final java.lang.String UNKNOWN_SERVICE_ERROR
Tag if a service requested does not exist

UNKNOWN_FUNCTION_ERROR

public static final java.lang.String UNKNOWN_FUNCTION_ERROR
Tag if a service function requested does not exist

INVALID_REQUEST_ID_ERROR

public static final java.lang.String INVALID_REQUEST_ID_ERROR
Tag if a service request id is unknown

INVALID_TIMING_ERROR

public static final java.lang.String INVALID_TIMING_ERROR
Tag if a service timing is incorrect (synchronous vs asynchronous

DUPLICATE_ERROR

public static final java.lang.String DUPLICATE_ERROR
Tag if a request is a duplicate

UNKNOWN_SUBSCRIPTION_ERROR

public static final java.lang.String UNKNOWN_SUBSCRIPTION_ERROR
Tag if a request is for an invalid subscription
Constructor Detail

Error

public Error()
Empty constructor

Error

public Error(java.lang.String err)
Constructor that takes an error string
Parameters:
err - String that defines the error

Error

public Error(DataObject data)
Constructor that takes a DataObject holding the error info The DataObject is expected to contain the tag.
Parameters:
data - DataObject containing the error info
Method Detail

toDataObject

public DataObject toDataObject()
This method converts the Error object to a DataObject
Returns:
Error object converted to an DataObject

setError

public void setError(java.lang.String err)
Sets the error string
Parameters:
err - String containing the error

getError

public java.lang.String getError()
Returns the error string
Returns:
error string

toString

public java.lang.String toString()
Returns a printable version of this class
Overrides:
toString in class java.lang.Object
Returns:
printable version of this class