com.objectxp.msg
Class Cimd2Exception

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.objectxp.msg.MessageException
              extended by com.objectxp.msg.Cimd2Exception
All Implemented Interfaces:
java.io.Serializable

public class Cimd2Exception
extends MessageException

This exception will be thrown by the Cimd2SmsService for CIMD2 specific exceptions. See the Nokia CIMD2 Specification available at forum.nokia.com for more information about possible error codes.

See Also:
Cimd2SmsService, Serialized Form

Field Summary
static int ERROR_CODE_UNKNOWN
          Unknown error code
static int ERROR_TYPE_GENERAL
          Type of CIMD2 error: General
static int ERROR_TYPE_GENERIC
          Generic error response
static int ERROR_TYPE_INTEGRITY
          Response integrity failure
static int ERROR_TYPE_NACK
          Type of CIMD2 error: NACK
static int ERROR_TYPE_UNKNOWN
          Unknown error
 
Method Summary
 int getErrorCode()
          Returns the error code for General errors.
 java.lang.String getErrorText()
          Returns the error text.
 int getErrorType()
          Returns the type of CIMD2 error.
 java.lang.String getMessage()
          Get the message for this Exception
 boolean isOffsetMismatch()
          Returns true if a offset mismatch occured.
 boolean isSequenceMismatch()
          Returns true if a sequence mismatch occured.
 
Methods inherited from class com.objectxp.msg.MessageException
getException, printStackTrace, printStackTrace, printStackTrace
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, setStackTrace, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ERROR_TYPE_GENERAL

public static final int ERROR_TYPE_GENERAL
Type of CIMD2 error: General

See Also:
Constant Field Values

ERROR_TYPE_NACK

public static final int ERROR_TYPE_NACK
Type of CIMD2 error: NACK

See Also:
Constant Field Values

ERROR_TYPE_INTEGRITY

public static final int ERROR_TYPE_INTEGRITY
Response integrity failure

See Also:
Constant Field Values

ERROR_TYPE_GENERIC

public static final int ERROR_TYPE_GENERIC
Generic error response

See Also:
Constant Field Values

ERROR_TYPE_UNKNOWN

public static final int ERROR_TYPE_UNKNOWN
Unknown error

See Also:
Constant Field Values

ERROR_CODE_UNKNOWN

public static final int ERROR_CODE_UNKNOWN
Unknown error code

See Also:
Constant Field Values
Method Detail

getMessage

public java.lang.String getMessage()
Description copied from class: MessageException
Get the message for this Exception

Overrides:
getMessage in class MessageException

getErrorType

public int getErrorType()
Returns the type of CIMD2 error.

Returns:
the error type (one of ERROR_TYPE_GENERAL, ERROR_TYPE_NACK, ERROR_TYPE_GENERIC, ERROR_TYPE_UNKNOWN, ERROR_TYPE_INTEGRITY)

getErrorCode

public int getErrorCode()
Returns the error code for General errors. For errors of type ERROR_TYPE_NACK, the error code returned is ERROR_CODE_UNKNOWN.


getErrorText

public java.lang.String getErrorText()
Returns the error text.


isSequenceMismatch

public boolean isSequenceMismatch()
Returns true if a sequence mismatch occured. Sequence errors will normally be signaled with a NACK error, but can also occur if a non-error CIMD2 response operation contains the wrong sequence number.


isOffsetMismatch

public boolean isOffsetMismatch()
Returns true if a offset mismatch occured. If a response is not of type General Error or NACK, the CIMD2 operation number for responses must be equal the corresponding request operation number + 50.



object XP, Inc. © 2000-2008. All rights reserved object XP