edu.columbia.coms6901.pingtel.pingim
Class SUBSCRIBEListener
java.lang.Object
|
+--com.pingtel.sip.SipAgent
|
+--edu.columbia.coms6901.pingtel.pingim.SUBSCRIBEListener
- public class SUBSCRIBEListener
- extends com.pingtel.sip.SipAgent
Listens for and replies to SUBSCRIBE messeages.
If sender is in buddy list, then replies to SUBSCRIBE with NOTIFY.
If sender is not in buddy list, prompts user if sender should be added.
Responds to all requests with 202.
- 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 SUBSCRIBE messages |
private void |
promptForAction(com.pingtel.sip.SipMessage message)
Prompts user for one of two actions when a subscription comes in from
a user who is not in the buddy list:
reject subscription
accept subscription |
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
- the current instantiation of PingIM
SUBSCRIBEListener
public SUBSCRIBEListener(PingIM application)
- Creates a new instance of SUBSCRIBEListener
- Parameters:
application
- the current instantiation of PingIM
handleMessage
public void handleMessage(com.pingtel.sip.SipMessage message)
- Handles incoming SUBSCRIBE messages
- Overrides:
handleMessage
in class com.pingtel.sip.SipAgent
- Parameters:
message
- Incoming SIP message
promptForAction
private void promptForAction(com.pingtel.sip.SipMessage message)
- Prompts user for one of two actions when a subscription comes in from
a user who is not in the buddy list:
reject subscription
accept subscription
- Parameters:
message
- The incoming SIP SUBSCRIBE message
setApplication
protected void setApplication(PingIM app)
- Sets local Application variable to point to current PingTel Expression
- Parameters:
app
- Current PingTel Expression application