javax.microedition.sip
Class SipException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.io.IOException
              extended by javax.microedition.sip.SipException
All Implemented Interfaces:
java.io.Serializable

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.

See Also:
Serialized Form

Field Summary
static byte ALREADY_RESPONDED
          The response can not be sent because the system has already sent a response.
static byte DIALOG_UNAVAILABLE
          Deprecated.  
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 SipConnection or SipRefreshHelper.
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
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, 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
Deprecated. 

Thrown for example when SIP connection does not belong to any Dialog.

As of version 1.1.0 this error code is deprecated, as it was not used at all in previous versions.

See Also:
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.

As of version 1.1.0 this error code is not thrown when sending, as the content length header is automatically set if not given by the user.

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

INVALID_STATE

public static final byte INVALID_STATE

Method call not allowed, because of wrong state in SipConnection or SipRefreshHelper.

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

ALREADY_RESPONDED

public static final byte ALREADY_RESPONDED

The response can not be sent because the system has already sent a response.

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

GENERAL_ERROR

public static final byte GENERAL_ERROR

Other SIP error. An error that does not fit naturally into the other categories. For example this exception can be thrown from any method that throws SipException if there is an error within a native SIP stack serving the request.

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 © 2007 Nokia Corporation. All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.