edu.columbia.coms6901.pingtel.pingim
Class NOTIFYListener
java.lang.Object
|
+--com.pingtel.sip.SipAgent
|
+--edu.columbia.coms6901.pingtel.pingim.NOTIFYListener
- public class NOTIFYListener
- extends com.pingtel.sip.SipAgent
Listens for incoming NOTIFY messages. When incoming message arrives,
updates status for that buddy.
- Version:
- 1.0
- Author:
- Micah Sherr
Inner classes inherited from class com.pingtel.sip.SipAgent |
com.pingtel.sip.SipAgent.icSipMessageListener |
Fields inherited from class com.pingtel.sip.SipAgent |
m_htContainFilter, m_htMatchFilter, m_listener, m_strMethod |
Method Summary |
void |
handleMessage(com.pingtel.sip.SipMessage message)
Handles incoming NOTIFY messages |
private int |
parseXML(java.lang.String sContent)
Parses the XML content of the message and returns the code
representing the status. |
protected void |
setApplication(PingIM app)
Sets local Application variable to point to current PingTel Expression |
Methods inherited from class com.pingtel.sip.SipAgent |
addContainsHeaderFilter, addMatchHeaderFilter, SendOKResponse, sendResponse, start, stop |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
application
private PingIM application
- current instantiation of PingIM Xpression
NOTIFYListener
public NOTIFYListener(PingIM application)
- Creates a new instance of NOTIFYListener
- Parameters:
application
- current instantiation of PingIM Xpression
handleMessage
public void handleMessage(com.pingtel.sip.SipMessage message)
- Handles incoming NOTIFY messages
- Overrides:
handleMessage
in class com.pingtel.sip.SipAgent
- Parameters:
message
- Incoming SIP message
setApplication
protected void setApplication(PingIM app)
- Sets local Application variable to point to current PingTel Expression
- Parameters:
app
- Current PingTel Expression application
parseXML
private int parseXML(java.lang.String sContent)
throws java.io.IOException
- Parses the XML content of the message and returns the code
representing the status.
Portions borrowed from KXML sample code at:
http://www.microjava.com/articles/techtalk/kxml?content_id=1030
- Parameters:
sContent
- the XML content of the NOTIFY message- Returns:
- status code provided in payload of message
- Throws:
java.io.IOException
- thrown if parsing of XML fails