context.arch.util
Class Error

java.lang.Object
  extended bycontext.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 IO_ERROR
          Tag used when IOException occurs
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

See Also:
Constant Field Values

NO_ERROR

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

See Also:
Constant Field Values

EMPTY_RESULT_ERROR

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

See Also:
Constant Field Values

INVALID_REQUEST_ERROR

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

See Also:
Constant Field Values

INVALID_ID_ERROR

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

See Also:
Constant Field Values

MISSING_PARAMETER_ERROR

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

See Also:
Constant Field Values

UNKNOWN_SUBSCRIBER_ERROR

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

See Also:
Constant Field Values

UNKNOWN_CALLBACK_ERROR

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

See Also:
Constant Field Values

UNKNOWN_METHOD_ERROR

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

See Also:
Constant Field Values

INVALID_DATA_ERROR

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

See Also:
Constant Field Values

INCOMPLETE_DATA_ERROR

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

See Also:
Constant Field Values

INVALID_ATTRIBUTE_ERROR

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

See Also:
Constant Field Values

INVALID_CALLBACK_ERROR

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

See Also:
Constant Field Values

UNKNOWN_SERVICE_ERROR

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

See Also:
Constant Field Values

UNKNOWN_FUNCTION_ERROR

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

See Also:
Constant Field Values

INVALID_REQUEST_ID_ERROR

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

See Also:
Constant Field Values

INVALID_TIMING_ERROR

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

See Also:
Constant Field Values

DUPLICATE_ERROR

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

See Also:
Constant Field Values

UNKNOWN_SUBSCRIPTION_ERROR

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

See Also:
Constant Field Values

IO_ERROR

public static final java.lang.String IO_ERROR
Tag used when IOException occurs

See Also:
Constant Field Values
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

Returns:
printable version of this class