|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--local.ua.PresenceAgent
Simple Presence Agent (PA).
It allows a user to subscribe for a presentity acting as presence watcher, or
respond to subscription requests (accepting or refusiong the incoming watcher's
requests) acting as presentity that watchers can subscribe for.
In the latter case, it simply acts as authorization entity for subscription events.
| Field Summary | |
protected PresenceAgentListener |
listener
Presence listener |
protected org.zoolu.tools.Log |
log
Event logger. |
protected org.zoolu.sip.dialog.NotifierDialog |
notifier_dialog
NotifierDialog. |
protected org.zoolu.sip.provider.SipProvider |
sip_provider
SipProvider |
protected org.zoolu.sip.dialog.SubscriberDialog |
subscriber_dialog
SubscriberDialog. |
protected UserAgentProfile |
user_profile
UserProfile |
| Constructor Summary | |
PresenceAgent(org.zoolu.sip.provider.SipProvider sip_provider,
UserAgentProfile user_profile,
PresenceAgentListener listener)
Costructs a new PresenceAgent. |
|
| Method Summary | |
void |
accept()
Notify a watcher of "active" state. |
void |
activate()
Notify a watcher of "active" state. |
void |
notify(java.lang.String state,
int expires,
java.lang.String content_type,
java.lang.String body)
Notify a watcher. |
void |
onDlgNotificationFailure(org.zoolu.sip.dialog.NotifierDialog dialog,
int code,
java.lang.String reason,
org.zoolu.sip.message.Message msg)
When a 300-699 response is received for a NOTIFY transaction. |
void |
onDlgNotificationSuccess(org.zoolu.sip.dialog.NotifierDialog dialog,
int code,
java.lang.String reason,
org.zoolu.sip.message.Message msg)
When a 2xx successfull final response is received for a NOTIFY transaction. |
void |
onDlgNotify(org.zoolu.sip.dialog.SubscriberDialog dialog,
org.zoolu.sip.address.NameAddress target,
org.zoolu.sip.address.NameAddress notifier,
org.zoolu.sip.address.NameAddress contact,
java.lang.String state,
java.lang.String content_type,
java.lang.String body,
org.zoolu.sip.message.Message msg)
When an incoming NOTIFY is received. |
void |
onDlgNotifyTimeout(org.zoolu.sip.dialog.NotifierDialog dialog)
When NOTIFY transaction expires without a final response. |
void |
onDlgSubscribe(org.zoolu.sip.dialog.NotifierDialog dialog,
org.zoolu.sip.address.NameAddress target,
org.zoolu.sip.address.NameAddress subscriber,
java.lang.String event,
java.lang.String id,
org.zoolu.sip.message.Message msg)
When an incoming SUBSCRIBE is received. |
void |
onDlgSubscribeTimeout(org.zoolu.sip.dialog.SubscriberDialog dialog)
When SUBSCRIBE transaction expires without a final response. |
void |
onDlgSubscriptionFailure(org.zoolu.sip.dialog.SubscriberDialog dialog,
int code,
java.lang.String reason,
org.zoolu.sip.message.Message msg)
When a 300-699 response is received for an SUBSCRIBE transaction. |
void |
onDlgSubscriptionSuccess(org.zoolu.sip.dialog.SubscriberDialog dialog,
int code,
java.lang.String reason,
org.zoolu.sip.message.Message msg)
When a 2xx successfull final response is received for an SUBSCRIBE transaction. |
void |
onDlgSubscriptionTerminated(org.zoolu.sip.dialog.SubscriberDialog dialog)
When the dialog is terminated. |
void |
subscribe(java.lang.String presentity,
int expires)
Subscribes for a presentity. |
void |
terminate()
Notify a watcher of "terminate" state. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected org.zoolu.tools.Log log
protected UserAgentProfile user_profile
protected org.zoolu.sip.provider.SipProvider sip_provider
protected org.zoolu.sip.dialog.SubscriberDialog subscriber_dialog
protected org.zoolu.sip.dialog.NotifierDialog notifier_dialog
protected PresenceAgentListener listener
| Constructor Detail |
public PresenceAgent(org.zoolu.sip.provider.SipProvider sip_provider,
UserAgentProfile user_profile,
PresenceAgentListener listener)
| Method Detail |
public void subscribe(java.lang.String presentity,
int expires)
public void accept()
public void activate()
public void terminate()
public void notify(java.lang.String state,
int expires,
java.lang.String content_type,
java.lang.String body)
public void onDlgSubscriptionSuccess(org.zoolu.sip.dialog.SubscriberDialog dialog,
int code,
java.lang.String reason,
org.zoolu.sip.message.Message msg)
onDlgSubscriptionSuccess in interface org.zoolu.sip.dialog.SubscriberDialogListener
public void onDlgSubscriptionFailure(org.zoolu.sip.dialog.SubscriberDialog dialog,
int code,
java.lang.String reason,
org.zoolu.sip.message.Message msg)
onDlgSubscriptionFailure in interface org.zoolu.sip.dialog.SubscriberDialogListenerpublic void onDlgSubscribeTimeout(org.zoolu.sip.dialog.SubscriberDialog dialog)
onDlgSubscribeTimeout in interface org.zoolu.sip.dialog.SubscriberDialogListenerpublic void onDlgSubscriptionTerminated(org.zoolu.sip.dialog.SubscriberDialog dialog)
onDlgSubscriptionTerminated in interface org.zoolu.sip.dialog.SubscriberDialogListener
public void onDlgNotify(org.zoolu.sip.dialog.SubscriberDialog dialog,
org.zoolu.sip.address.NameAddress target,
org.zoolu.sip.address.NameAddress notifier,
org.zoolu.sip.address.NameAddress contact,
java.lang.String state,
java.lang.String content_type,
java.lang.String body,
org.zoolu.sip.message.Message msg)
onDlgNotify in interface org.zoolu.sip.dialog.SubscriberDialogListener
public void onDlgSubscribe(org.zoolu.sip.dialog.NotifierDialog dialog,
org.zoolu.sip.address.NameAddress target,
org.zoolu.sip.address.NameAddress subscriber,
java.lang.String event,
java.lang.String id,
org.zoolu.sip.message.Message msg)
onDlgSubscribe in interface org.zoolu.sip.dialog.NotifierDialogListenerpublic void onDlgNotifyTimeout(org.zoolu.sip.dialog.NotifierDialog dialog)
onDlgNotifyTimeout in interface org.zoolu.sip.dialog.NotifierDialogListener
public void onDlgNotificationFailure(org.zoolu.sip.dialog.NotifierDialog dialog,
int code,
java.lang.String reason,
org.zoolu.sip.message.Message msg)
onDlgNotificationFailure in interface org.zoolu.sip.dialog.NotifierDialogListener
public void onDlgNotificationSuccess(org.zoolu.sip.dialog.NotifierDialog dialog,
int code,
java.lang.String reason,
org.zoolu.sip.message.Message msg)
onDlgNotificationSuccess in interface org.zoolu.sip.dialog.NotifierDialogListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||