javax.microedition.sip
Class SipException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.io.IOException
              extended byjavax.microedition.sip.SipException

public class SipException
extends java.io.IOException

This is an exception class for SIP specific errors. The exception includes free format textual error message and error code to categorize the error.


Field Summary
static byte DIALOG_UNAVAILABLE
          Thrown for example when SIP connection does not belong to any Dialog.
static byte GENERAL_ERROR
          Other SIP error
static byte INVALID_MESSAGE
          The message to be sent has invalid format.
static byte INVALID_OPERATION
          The system does not allow particular operation.
static byte INVALID_STATE
          Method call not allowed, because of wrong state in SIP connection.
static byte TRANSACTION_UNAVAILABLE
          System can not open any new transactions.
static byte TRANSPORT_NOT_SUPPORTED
          The requested transport is not supported
static byte UNKNOWN_LENGTH
          Used when for example Content-Length is not set before filling the message body
static byte UNKNOWN_TYPE
          Used when for example Content-Type is not set before filling the message body.
 
Constructor Summary
SipException(byte errorCode)
          Construct SipException with error code.
SipException(java.lang.String message, byte errorCode)
          Construct SipException with textual message and error code.
 
Method Summary
 byte getErrorCode()
          Gets the error code
 
Methods inherited from class java.lang.Throwable
getMessage, printStackTrace, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TRANSPORT_NOT_SUPPORTED

public static final byte TRANSPORT_NOT_SUPPORTED
The requested transport is not supported

See Also:
SipConnection, Constant Field Values

DIALOG_UNAVAILABLE

public static final byte DIALOG_UNAVAILABLE
Thrown for example when SIP connection does not belong to any Dialog.

See Also:
SipConnection.getDialog(), Constant Field Values

UNKNOWN_TYPE

public static final byte UNKNOWN_TYPE
Used when for example Content-Type is not set before filling the message body.

See Also:
SipConnection.openContentOutputStream(), Constant Field Values

UNKNOWN_LENGTH

public static final byte UNKNOWN_LENGTH
Used when for example Content-Length is not set before filling the message body

See Also:
SipConnection.openContentOutputStream(), Constant Field Values

INVALID_STATE

public static final byte INVALID_STATE
Method call not allowed, because of wrong state in SIP connection.

See Also:
SipConnection, SipClientConnection, SipServerConnection, Constant Field Values

INVALID_OPERATION

public static final byte INVALID_OPERATION
The system does not allow particular operation. NOTICE! This error does not handle security exceptions.

See Also:
SipConnection, SipClientConnection, SipServerConnection, Constant Field Values

TRANSACTION_UNAVAILABLE

public static final byte TRANSACTION_UNAVAILABLE
System can not open any new transactions.

See Also:
SipConnection, SipConnectionNotifier.acceptAndOpen(), Constant Field Values

INVALID_MESSAGE

public static final byte INVALID_MESSAGE
The message to be sent has invalid format.

See Also:
SipConnection.send(), Constant Field Values

GENERAL_ERROR

public static final byte GENERAL_ERROR
Other SIP error

See Also:
Constant Field Values
Constructor Detail

SipException

public SipException(byte errorCode)
Construct SipException with error code.

Parameters:
errorCode - error code. If the error code is none of the specified codes the Exception is initialized with default GENERAL_ERROR.

SipException

public SipException(java.lang.String message,
                    byte errorCode)
Construct SipException with textual message and error code.

Parameters:
message - error message.
errorCode - error code. If the error code is none of the specified codes the Exception is initialized with default GENERAL_ERROR.
Method Detail

getErrorCode

public byte getErrorCode()
Gets the error code



Copyright © 2004 Nokia Corporation. All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.