|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.sip.communicator.impl.protocol.sip.MethodProcessorAdapter
net.java.sip.communicator.impl.protocol.sip.EventPackageSupport
net.java.sip.communicator.impl.protocol.sip.EventPackageNotifier
public abstract class EventPackageNotifier
Implements the notifier part of RFC 3265 "Session Initiation Protocol (SIP)-Specific Event Notification" and thus eases the creation of event package-specific implementations.
| Nested Class Summary | |
|---|---|
static class |
EventPackageNotifier.Subscription
Represents a general event package subscription in the sense of RFC 3265 "Session Initiation Protocol (SIP)-Specific Event Notification" from the point of view of the notifier and its signaling characteristics such as Request URI, id tag value of its Event header, the Dialog which has been created by the associated SUBSCRIBE request or through which NOTIFY requests are to be sent. |
static interface |
EventPackageNotifier.SubscriptionFilter
Represents a filter for Subscriptions i.e. |
| Field Summary |
|---|
| Fields inherited from class net.java.sip.communicator.impl.protocol.sip.EventPackageSupport |
|---|
contentSubType, eventPackage, protocolProvider, subscriptionDuration, timer |
| Constructor Summary | |
|---|---|
EventPackageNotifier(ProtocolProviderServiceSipImpl protocolProvider,
String eventPackage,
int subscriptionDuration,
String contentSubType,
TimerScheduler timer)
Initializes a new EventPackageNotifier instance which is to provide notifier support according to RFC 3265 to a specific SIP ProtocolProviderService implementation for a specific event package. |
|
| Method Summary | |
|---|---|
protected abstract EventPackageNotifier.Subscription |
createSubscription(javax.sip.address.Address fromAddress,
String eventId)
Creates a new Subscription instance which is to represent the subscription signaling from and to a specific target identified by its Address/Request URI and a specific EventId tag. |
protected EventPackageNotifier.Subscription |
getSubscription(javax.sip.address.Address fromAddress,
String eventId)
Gets the Subscription from the list of subscriptions managed by this instance which is associated with a specific subscription Address/Request URI and has a specific id tag in its Event header. |
protected EventPackageNotifier.Subscription |
getSubscription(String callId)
Gets the Subscription from the list of subscriptions managed by this instance which is associated with a specific CallId. |
void |
notify(EventPackageNotifier.Subscription subscription,
String subscriptionState,
String reason)
Notifies a specific target identified by its Subscription about a specific subscription state and a specific reason for that subscription state via a NOTIFY request. |
void |
notifyAll(String subscriptionState,
String reason)
Notifies all targets represented by the Subscriptions managed by this instance about a specific subscription state and a specific reason for that subscription state via NOTIFY requests. |
void |
notifyAll(String subscriptionState,
String reason,
EventPackageNotifier.SubscriptionFilter filter)
Notifies all targets represented by the Subscriptions managed by this instance which are accepted by a specific SubscriptionFilter about a specific subscription state and a specific reason for that subscription state via NOTIFY requests. |
boolean |
processRequest(javax.sip.RequestEvent requestEvent)
Processes incoming subscribe requests. |
boolean |
processResponse(javax.sip.ResponseEvent responseEvent)
Handles an incoming response to a request we'vre previously sent. |
protected void |
removeSubscription(javax.sip.message.Response response,
String eventId,
javax.sip.ClientTransaction clientTransaction)
Removes a Subscription from the list of subscriptions managed by this instance identified by the Response to our NOTIFY request. |
| Methods inherited from class net.java.sip.communicator.impl.protocol.sip.EventPackageSupport |
|---|
addSubscription, getEventPackage, getOrCreateServerTransaction, getSubscriptions, processAuthenticationChallenge, processAuthenticationChallenge, removeSubscription, removeSubscription, removeSubscription, sendNotImplementedResponse |
| Methods inherited from class net.java.sip.communicator.impl.protocol.sip.MethodProcessorAdapter |
|---|
processDialogTerminated, processIOException, processTimeout, processTransactionTerminated |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EventPackageNotifier(ProtocolProviderServiceSipImpl protocolProvider,
String eventPackage,
int subscriptionDuration,
String contentSubType,
TimerScheduler timer)
protocolProvider - the SIP ProtocolProviderService
implementation for which the new instance is to provide notifier support
for a specific event packageeventPackage - the name of the event package the new instance is to
implement and carry in the Event and Allow-Events headerssubscriptionDuration - the duration of each subscription to be
managed by the new instance and to be carried in the Expires headerscontentSubType - the sub-type of the content type of the NOTIFY
bodies to be announced, expected and supported by the subscriptions to be
managed by the new instancetimer - the Timer support which is to time out the
subscriptions to be managed by the new instance| Method Detail |
|---|
protected abstract EventPackageNotifier.Subscription createSubscription(javax.sip.address.Address fromAddress,
String eventId)
fromAddress - the Address/Request URI of the subscription
targeteventId - the EventId tag of the subscription signaling associated
with the specified target
protected EventPackageNotifier.Subscription getSubscription(javax.sip.address.Address fromAddress,
String eventId)
getSubscription in class EventPackageSupportfromAddress - the subscription Address/Request URI of the
Subscription to be retrievedeventId - the id tag placed in the Event header of the
Subscription to be retrieved if there is one or null if
the Subscription should have no id tag in its Event header
protected EventPackageNotifier.Subscription getSubscription(String callId)
getSubscription in class EventPackageSupportcallId - the CallId associated with the Subscription to be
retrieved
public void notify(EventPackageNotifier.Subscription subscription,
String subscriptionState,
String reason)
throws OperationFailedException
subscription - the target identified by its Subscription to
be notified about the specified subscription state and the specified
reason for that subscription state via a NOTIFY requestsubscriptionState - the subscription state to notify the target
represented by its Subscription aboutreason - the reason for that subscription state
OperationFailedException - if sending the NOTIFY request failed
public void notifyAll(String subscriptionState,
String reason)
throws OperationFailedException
subscriptionState - the subscription state to be sent to all targets
represented by the Subscriptions managed by this instance via
NOTIFY requestsreason - the reason for the specified subscription state
OperationFailedException - if anything goes wrong while sending out
the notifications.
public void notifyAll(String subscriptionState,
String reason,
EventPackageNotifier.SubscriptionFilter filter)
throws OperationFailedException
subscriptionState - the subscription state to be sent to all targets
represented by the Subscriptions managed by this instance which
are accepted by filter via NOTIFY requestsreason - the reason for the specified subscription statefilter - the SubscriptionFilter to pick up the
Subscriptions managed by this instance to be notified about
subscriptionState
OperationFailedException - if anything goes wrong while sending out
the notificationspublic boolean processRequest(javax.sip.RequestEvent requestEvent)
processRequest in interface MethodProcessorprocessRequest in class MethodProcessorAdapterrequestEvent - the event containing the request we need to handle
MethodProcessor.processRequest(RequestEvent)public boolean processResponse(javax.sip.ResponseEvent responseEvent)
processResponse in interface MethodProcessorprocessResponse in class MethodProcessorAdapterresponseEvent - the event we need to handle
MethodProcessor.processResponse(ResponseEvent)
protected void removeSubscription(javax.sip.message.Response response,
String eventId,
javax.sip.ClientTransaction clientTransaction)
response - a Response identifying the Subscription
to be removed from the list of subscriptions managed by this instanceeventId - the value of the id tagclientTransaction - the ClientTransaction through which the
specified Response came
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||