FileDocCategorySizeDatePackage
SIPServerException.javaAPI DocphoneME MR2 API (J2ME)3802Wed May 02 18:00:42 BST 2007gov.nist.siplite.stack

SIPServerException

public class SIPServerException extends Exception
Exception that gets generated when the Stack encounters an error.
version
JAIN-SIP-1.1 This code is in the public domain.

Fields Summary
protected int
rc
Return code.
protected String
message
Message.
protected Message
sipMessage
The saved SIP server message.
Constructors Summary
public SIPServerException(int rc)
Constructor when we are given only the error code

param
rc Return code.

        this.rc = rc;
        
        if (Logging.REPORT_LEVEL <= Logging.INFORMATION) {
            printStackTrace();
        }
    
public SIPServerException(int rc, String msg)
Constructor for when we have the error code and some error info.

param
rc SIP Return code
param
msg Error message

        this.rc = rc;
        this.message = msg;
        
        if (Logging.REPORT_LEVEL <= Logging.INFORMATION) {
            printStackTrace();
        }
    
public SIPServerException(int rc, Message message, String msg)
Constructor for when we have a return code and a Message.

param
rc SIP error code
param
message SIP Error message
param
msg Auxiliary error message

        this.rc = rc;
        this.sipMessage = message;
        this.message = msg;
        
        if (Logging.REPORT_LEVEL <= Logging.INFORMATION) {
            printStackTrace();
        }
    
public SIPServerException(String response)
Constructor when we have a pre-formatted response.

param
response Pre-formatted response to send back to the other end.

        super(response);
        ServerLog.logException(this);
    
public SIPServerException(int rc, Message sipMessage)
Constructor that constructs the message from the standard Error messages.

param
rc is the SIP Error code.
param
sipMessage is the SIP Message that caused the exception.

        this.rc = rc;
        this.sipMessage = sipMessage;
    
Methods Summary
public intgetRC()
Gets the reason code.

return
the reason code

        return this.rc;
    
public MessagegetSIPMessage()
Gets the message that generated this exception.

return
-- the message that generated this exception.

        return this.sipMessage;