edu.columbia.coms6901.pingtel.pingim
Class SIPMessage
java.lang.Object
|
+--edu.columbia.coms6901.pingtel.pingim.SIPMessage
- Direct Known Subclasses:
- DOMessage, MESSAGEMessage, NOTIFYMessage, SUBSCRIBEMessage
- public class SIPMessage
- extends java.lang.Object
Handles SIP calls. The individual messages (NOTIFY, MESSAGE,
SUBSCRIBE) all extend this class. Thus, this class provides the common
functionality of the SIP messages.
- Version:
- 1.0
- Author:
- Micah Sherr
Field Summary |
protected boolean |
bValidity
is this a valid message? true == yes |
protected java.util.Random |
randomNumberGenerator
a random number generator |
private com.pingtel.sip.SipResponse |
response
the response for this message, if any |
protected com.pingtel.sip.SipRequest |
sipRequest
the actual SIP Message |
Constructor Summary |
SIPMessage()
Creates a new instance of SIPHandler |
Method Summary |
protected com.pingtel.sip.SipResponse |
getResponse()
Retrieves the response for this SIP message |
protected boolean |
send()
Sends the SIP message |
protected int |
sendAndWait()
Sends the SIP message and waits for a response |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
sipRequest
protected com.pingtel.sip.SipRequest sipRequest
- the actual SIP Message
randomNumberGenerator
protected java.util.Random randomNumberGenerator
- a random number generator
bValidity
protected boolean bValidity
- is this a valid message? true == yes
response
private com.pingtel.sip.SipResponse response
- the response for this message, if any
SIPMessage
public SIPMessage()
- Creates a new instance of SIPHandler
send
protected boolean send()
- Sends the SIP message
- Returns:
- true if successful, otherwise false
sendAndWait
protected int sendAndWait()
throws IMException
- Sends the SIP message and waits for a response
- Returns:
- response code (e.g., 200, etc.)
- Throws:
IMException
- thrown if sending or retrieving response fails
getResponse
protected com.pingtel.sip.SipResponse getResponse()
- Retrieves the response for this SIP message
- Returns:
- the response for this message