FileDocCategorySizeDatePackage
SipException.javaAPI DocphoneME MR2 API (J2ME)4063Wed May 02 18:00:42 BST 2007javax.microedition.sip

SipException

public class SipException extends IOException
This is an exception class for SIP specific errors.
see
JSR180 spec, v 1.0.1, p 63-66

Fields Summary
public static final byte
GENERAL_ERROR
Other SIP error
public static final byte
TRANSPORT_NOT_SUPPORTED
The requested transport is not supported
public static final byte
DIALOG_UNAVAILABLE
Thrown for example when SIP connection does not belong to any Dialog.
public static final byte
UNKNOWN_TYPE
Used when for example Content-Type is not set before filling the message body.
public static final byte
UNKNOWN_LENGTH
Used when for example Content-Length is not set before filling the message body
public static final byte
INVALID_STATE
Method call not allowed, because of wrong state in SIP connection.
public static final byte
INVALID_OPERATION
The system does not allow particular operation. NOTICE! This error does not handle security exceptions.
public static final byte
TRANSACTION_UNAVAILABLE
System can not open any new transactions.
public static final byte
INVALID_MESSAGE
The message to be sent has invalid format.
private byte
error_code
Current error code for this sip exception
Constructors Summary
public SipException(byte errorCode)
Construct SipException with error code.

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


                                     
       
        super();

        if (errorCode > INVALID_MESSAGE || errorCode < GENERAL_ERROR) {
            // If the error code is none of the specified codes
            // the Exception is initialized with default GENERAL_ERROR.
            errorCode = GENERAL_ERROR;
        } else {
            error_code = errorCode;
        }
    
public SipException(String message, byte errorCode)
Construct SipException with textual message and error code.

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

        super(message);

        if (errorCode > INVALID_MESSAGE || errorCode < GENERAL_ERROR) {
            // If the error code is none of the specified codes
            // the Exception is initialized with default GENERAL_ERROR.
            errorCode = GENERAL_ERROR;
        } else {
            error_code = errorCode;
        }
    
Methods Summary
public bytegetErrorCode()
Gets the error code

return
error code

        return error_code;