org.mobicents.slee.sipevent.server.subscription
Class SubscriptionControlSbb

java.lang.Object
  extended by org.mobicents.slee.sipevent.server.subscription.SubscriptionControlSbb
All Implemented Interfaces:
javax.slee.Sbb, EventListSubscriberParent, ImplementedSubscriptionControlParent, SubscriptionClientControl, SubscriptionControl

public abstract class SubscriptionControlSbb
extends java.lang.Object
implements javax.slee.Sbb, SubscriptionControl

Sbb to control subscriptions of sip events in a dialog

Author:
Eduardo Martins

Constructor Summary
SubscriptionControlSbb()
           
 
Method Summary
 void authorizationChanged(java.lang.String subscriber, Notifier notifier, java.lang.String eventPackage, java.lang.String eventId, int authorizationCode)
           
abstract  void fireNotifyEvent(NotifyEvent event, javax.slee.ActivityContextInterface aci, javax.slee.Address address)
          Used to fire events to notify the right sbb entity of a state change
abstract  void fireTerminateSubscriptionEvent(TerminateSubscriptionEvent event, javax.slee.ActivityContextInterface aci, javax.slee.Address address)
          Used to terminate a subscription.
abstract  void fireWInfoNotifyEvent(WInfoNotifyEvent event, javax.slee.ActivityContextInterface aci, javax.slee.Address address)
          Used to fire events to notify the right sbb entity of a winfo state change
 javax.slee.facilities.ActivityContextNamingFacility getActivityContextNamingfacility()
           
 javax.sip.address.AddressFactory getAddressFactory()
           
 SubscriptionControlManagement getConfiguration()
          Retrieves the current configuration for this component from an MBean
abstract  org.mobicents.slee.ChildRelationExt getEventListSubscriberChildRelation()
           
 EventListSubscriptionHandler getEventListSubscriptionHandler()
           
 javax.sip.header.HeaderFactory getHeaderFactory()
           
abstract  org.mobicents.slee.ChildRelationExt getImplementedControlChildRelation()
           
 ImplementedSubscriptionControlSbbLocalObject getImplementedControlChildSbb()
           
 InternalSubscriptionHandler getInternalSubscriptionHandler()
           
 javax.sip.message.MessageFactory getMessageFactory()
           
 javax.slee.nullactivity.NullActivityContextInterfaceFactory getNullACIFactory()
           
 javax.slee.nullactivity.NullActivityFactory getNullActivityFactory()
           
 SubscriptionClientControlParentSbbLocalObject getParentSbb()
           
 RLSServicesCacheActivityContextInterfaceFactory getRlsServicesCacheACIF()
           
 RLSServicesCacheSbbInterface getRlsServicesCacheRASbbInterface()
           
 javax.slee.SbbContext getSbbContext()
           
 net.java.slee.resource.sip.SipActivityContextInterfaceFactory getSipActivityContextInterfaceFactory()
           
 net.java.slee.resource.sip.SleeSipProvider getSipProvider()
           
 SipSubscriptionHandler getSipSubscribeHandler()
           
 Subscription getSubscription(SubscriptionKey key)
          Requests the subscription for the specified key.
 javax.slee.facilities.TimerFacility getTimerFacility()
           
 WInfoSubscriptionHandler getWInfoSubscriptionHandler()
           
 void newSubscriptionAuthorization(java.lang.String subscriber, java.lang.String subscriberDisplayName, Notifier notifier, SubscriptionKey key, int expires, int responseCode, boolean eventList, javax.sip.ServerTransaction serverTransaction)
           
 void notifyEventListSubscriber(SubscriptionKey key, MultiPart multiPart)
          Requests notification on a specific subscription, providing the multipart content.
 void notifySubscriber(SubscriptionKey key, NotifyContent notifyContent)
           
 void notifySubscribers(java.lang.String notifier, java.lang.String eventPackage, NotifyContent notifyContent)
           
 void onNotifyEvent(NotifyEvent event, javax.slee.ActivityContextInterface aci)
           
 void onResponseClientErrorEvent(javax.sip.ResponseEvent event, javax.slee.ActivityContextInterface aci)
          An error as the final response of a NOTIFY sent by this server.
 void onResponseServerErrorEvent(javax.sip.ResponseEvent event, javax.slee.ActivityContextInterface aci)
          An error as the final response of a NOTIFY sent by this server.
 void onRLSServicesAddedEvent(RLSServicesAddedEvent event, javax.slee.ActivityContextInterface aci)
          event handler for event that notifies a new rls service available
 void onServiceStartedEvent(javax.slee.serviceactivity.ServiceStartedEvent event, javax.slee.ActivityContextInterface aci)
           
 void onSubscribeInDialog(javax.sip.RequestEvent event, javax.slee.ActivityContextInterface aci)
          event handler for in dialog subscribe
 void onSubscribeOutOfDialog(javax.sip.RequestEvent event, javax.slee.ActivityContextInterface aci)
          event handler for initial subscribe, which is out of dialog
 void onTerminateSubscriptionEvent(TerminateSubscriptionEvent event, javax.slee.ActivityContextInterface aci)
           
 void onTimerEvent(javax.slee.facilities.TimerEvent event, javax.slee.ActivityContextInterface aci)
          a timer has occurred on a subscription
 void onWInfoNotifyEvent(WInfoNotifyEvent event, javax.slee.ActivityContextInterface aci)
           
 void removeSubscriptionData(SubscriptionControlDataSource dataSource, Subscription subscription, javax.sip.Dialog dialog, javax.slee.ActivityContextInterface aci, ImplementedSubscriptionControlSbbLocalObject childSbb)
          Removes a subscription data.
 void resubscribe(java.lang.String subscriber, java.lang.String notifier, java.lang.String eventPackage, java.lang.String subscriptionId, int expires)
           
 void sbbActivate()
           
 void sbbCreate()
           
 void sbbExceptionThrown(java.lang.Exception arg0, java.lang.Object arg1, javax.slee.ActivityContextInterface arg2)
           
 void sbbLoad()
           
 void sbbPassivate()
           
 void sbbPostCreate()
           
 void sbbRemove()
           
 void sbbRolledBack(javax.slee.RolledBackContext arg0)
           
 void sbbStore()
           
 void setSbbContext(javax.slee.SbbContext sbbContext)
          SbbObject's context setting
 void setSubscriptionTimerAndPersistSubscription(Subscription subscription, long delay, javax.slee.ActivityContextInterface aci)
           
 void subscribe(java.lang.String subscriber, java.lang.String subscriberDisplayName, java.lang.String notifierString, java.lang.String eventPackage, java.lang.String subscriptionId, int expires, java.lang.String content, java.lang.String contentType, java.lang.String contentSubtype)
           
 void unsetSbbContext()
           
 void unsubscribe(java.lang.String subscriber, java.lang.String notifier, java.lang.String eventPackage, java.lang.String subscriptionId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubscriptionControlSbb

public SubscriptionControlSbb()
Method Detail

getEventListSubscriptionHandler

public EventListSubscriptionHandler getEventListSubscriptionHandler()

getSipSubscribeHandler

public SipSubscriptionHandler getSipSubscribeHandler()

getWInfoSubscriptionHandler

public WInfoSubscriptionHandler getWInfoSubscriptionHandler()

getInternalSubscriptionHandler

public InternalSubscriptionHandler getInternalSubscriptionHandler()

getActivityContextNamingfacility

public javax.slee.facilities.ActivityContextNamingFacility getActivityContextNamingfacility()

getAddressFactory

public javax.sip.address.AddressFactory getAddressFactory()

getHeaderFactory

public javax.sip.header.HeaderFactory getHeaderFactory()

getMessageFactory

public javax.sip.message.MessageFactory getMessageFactory()

getNullACIFactory

public javax.slee.nullactivity.NullActivityContextInterfaceFactory getNullACIFactory()

getNullActivityFactory

public javax.slee.nullactivity.NullActivityFactory getNullActivityFactory()

getSbbContext

public javax.slee.SbbContext getSbbContext()

getSipActivityContextInterfaceFactory

public net.java.slee.resource.sip.SipActivityContextInterfaceFactory getSipActivityContextInterfaceFactory()

getSipProvider

public net.java.slee.resource.sip.SleeSipProvider getSipProvider()

getTimerFacility

public javax.slee.facilities.TimerFacility getTimerFacility()

getRlsServicesCacheRASbbInterface

public RLSServicesCacheSbbInterface getRlsServicesCacheRASbbInterface()

getRlsServicesCacheACIF

public RLSServicesCacheActivityContextInterfaceFactory getRlsServicesCacheACIF()

getConfiguration

public SubscriptionControlManagement getConfiguration()
Retrieves the current configuration for this component from an MBean

Returns:

getParentSbb

public SubscriptionClientControlParentSbbLocalObject getParentSbb()

getImplementedControlChildRelation

public abstract org.mobicents.slee.ChildRelationExt getImplementedControlChildRelation()

getImplementedControlChildSbb

public ImplementedSubscriptionControlSbbLocalObject getImplementedControlChildSbb()

getEventListSubscriberChildRelation

public abstract org.mobicents.slee.ChildRelationExt getEventListSubscriberChildRelation()

onRLSServicesAddedEvent

public void onRLSServicesAddedEvent(RLSServicesAddedEvent event,
                                    javax.slee.ActivityContextInterface aci)
event handler for event that notifies a new rls service available

Parameters:
event -
aci -

onTerminateSubscriptionEvent

public void onTerminateSubscriptionEvent(TerminateSubscriptionEvent event,
                                         javax.slee.ActivityContextInterface aci)

onSubscribeOutOfDialog

public void onSubscribeOutOfDialog(javax.sip.RequestEvent event,
                                   javax.slee.ActivityContextInterface aci)
event handler for initial subscribe, which is out of dialog

Parameters:
event -
aci -

onSubscribeInDialog

public void onSubscribeInDialog(javax.sip.RequestEvent event,
                                javax.slee.ActivityContextInterface aci)
event handler for in dialog subscribe

Parameters:
event -
aci -

onResponseClientErrorEvent

public void onResponseClientErrorEvent(javax.sip.ResponseEvent event,
                                       javax.slee.ActivityContextInterface aci)
An error as the final response of a NOTIFY sent by this server.

Parameters:
event -
aci -

onResponseServerErrorEvent

public void onResponseServerErrorEvent(javax.sip.ResponseEvent event,
                                       javax.slee.ActivityContextInterface aci)
An error as the final response of a NOTIFY sent by this server.

Parameters:
event -
aci -

onTimerEvent

public void onTimerEvent(javax.slee.facilities.TimerEvent event,
                         javax.slee.ActivityContextInterface aci)
a timer has occurred on a subscription

Parameters:
event -
aci -

onNotifyEvent

public void onNotifyEvent(NotifyEvent event,
                          javax.slee.ActivityContextInterface aci)

onServiceStartedEvent

public void onServiceStartedEvent(javax.slee.serviceactivity.ServiceStartedEvent event,
                                  javax.slee.ActivityContextInterface aci)

onWInfoNotifyEvent

public void onWInfoNotifyEvent(WInfoNotifyEvent event,
                               javax.slee.ActivityContextInterface aci)

newSubscriptionAuthorization

public void newSubscriptionAuthorization(java.lang.String subscriber,
                                         java.lang.String subscriberDisplayName,
                                         Notifier notifier,
                                         SubscriptionKey key,
                                         int expires,
                                         int responseCode,
                                         boolean eventList,
                                         javax.sip.ServerTransaction serverTransaction)
Specified by:
newSubscriptionAuthorization in interface ImplementedSubscriptionControlParent

notifySubscribers

public void notifySubscribers(java.lang.String notifier,
                              java.lang.String eventPackage,
                              NotifyContent notifyContent)
Specified by:
notifySubscribers in interface ImplementedSubscriptionControlParent

notifySubscriber

public void notifySubscriber(SubscriptionKey key,
                             NotifyContent notifyContent)
Specified by:
notifySubscriber in interface ImplementedSubscriptionControlParent

authorizationChanged

public void authorizationChanged(java.lang.String subscriber,
                                 Notifier notifier,
                                 java.lang.String eventPackage,
                                 java.lang.String eventId,
                                 int authorizationCode)
Specified by:
authorizationChanged in interface ImplementedSubscriptionControlParent

notifyEventListSubscriber

public void notifyEventListSubscriber(SubscriptionKey key,
                                      MultiPart multiPart)
Description copied from interface: EventListSubscriberParent
Requests notification on a specific subscription, providing the multipart content.

Specified by:
notifyEventListSubscriber in interface EventListSubscriberParent

getSubscription

public Subscription getSubscription(SubscriptionKey key)
Description copied from interface: EventListSubscriberParent
Requests the subscription for the specified key. The subscription's entity manager must be available.

Specified by:
getSubscription in interface EventListSubscriberParent
Returns:

subscribe

public void subscribe(java.lang.String subscriber,
                      java.lang.String subscriberDisplayName,
                      java.lang.String notifierString,
                      java.lang.String eventPackage,
                      java.lang.String subscriptionId,
                      int expires,
                      java.lang.String content,
                      java.lang.String contentType,
                      java.lang.String contentSubtype)
Specified by:
subscribe in interface SubscriptionClientControl

resubscribe

public void resubscribe(java.lang.String subscriber,
                        java.lang.String notifier,
                        java.lang.String eventPackage,
                        java.lang.String subscriptionId,
                        int expires)
Specified by:
resubscribe in interface SubscriptionClientControl

unsubscribe

public void unsubscribe(java.lang.String subscriber,
                        java.lang.String notifier,
                        java.lang.String eventPackage,
                        java.lang.String subscriptionId)
Specified by:
unsubscribe in interface SubscriptionClientControl

setSubscriptionTimerAndPersistSubscription

public void setSubscriptionTimerAndPersistSubscription(Subscription subscription,
                                                       long delay,
                                                       javax.slee.ActivityContextInterface aci)

removeSubscriptionData

public void removeSubscriptionData(SubscriptionControlDataSource dataSource,
                                   Subscription subscription,
                                   javax.sip.Dialog dialog,
                                   javax.slee.ActivityContextInterface aci,
                                   ImplementedSubscriptionControlSbbLocalObject childSbb)
Removes a subscription data.

Parameters:
entityManager -
subscription -
dialog -
aci -
childSbb -

setSbbContext

public void setSbbContext(javax.slee.SbbContext sbbContext)
SbbObject's context setting

Specified by:
setSbbContext in interface javax.slee.Sbb

sbbActivate

public void sbbActivate()
Specified by:
sbbActivate in interface javax.slee.Sbb

sbbCreate

public void sbbCreate()
               throws javax.slee.CreateException
Specified by:
sbbCreate in interface javax.slee.Sbb
Throws:
javax.slee.CreateException

sbbExceptionThrown

public void sbbExceptionThrown(java.lang.Exception arg0,
                               java.lang.Object arg1,
                               javax.slee.ActivityContextInterface arg2)
Specified by:
sbbExceptionThrown in interface javax.slee.Sbb

sbbLoad

public void sbbLoad()
Specified by:
sbbLoad in interface javax.slee.Sbb

sbbPassivate

public void sbbPassivate()
Specified by:
sbbPassivate in interface javax.slee.Sbb

sbbPostCreate

public void sbbPostCreate()
                   throws javax.slee.CreateException
Specified by:
sbbPostCreate in interface javax.slee.Sbb
Throws:
javax.slee.CreateException

sbbRemove

public void sbbRemove()
Specified by:
sbbRemove in interface javax.slee.Sbb

sbbRolledBack

public void sbbRolledBack(javax.slee.RolledBackContext arg0)
Specified by:
sbbRolledBack in interface javax.slee.Sbb

sbbStore

public void sbbStore()
Specified by:
sbbStore in interface javax.slee.Sbb

unsetSbbContext

public void unsetSbbContext()
Specified by:
unsetSbbContext in interface javax.slee.Sbb

fireNotifyEvent

public abstract void fireNotifyEvent(NotifyEvent event,
                                     javax.slee.ActivityContextInterface aci,
                                     javax.slee.Address address)
Used to fire events to notify the right sbb entity of a state change

Parameters:
event -
aci -
address -

fireWInfoNotifyEvent

public abstract void fireWInfoNotifyEvent(WInfoNotifyEvent event,
                                          javax.slee.ActivityContextInterface aci,
                                          javax.slee.Address address)
Used to fire events to notify the right sbb entity of a winfo state change

Parameters:
event -
aci -
address -

fireTerminateSubscriptionEvent

public abstract void fireTerminateSubscriptionEvent(TerminateSubscriptionEvent event,
                                                    javax.slee.ActivityContextInterface aci,
                                                    javax.slee.Address address)
Used to terminate a subscription.

Parameters:
event -
aci -
address -


Copyright © 2011. All Rights Reserved.