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, javax.slee.SbbLocalObject, org.mobicents.slee.sipevent.server.subscription.EventListSubscriptionControlParentSbbLocalObject, org.mobicents.slee.sipevent.server.subscription.ImplementedSubscriptionControlParentSbbLocalObject, org.mobicents.slee.sipevent.server.subscription.SubscriptionClientControlSbbLocalObject, org.mobicents.slee.sipevent.server.subscription.SubscriptionControlSbbLocalObject

public abstract class SubscriptionControlSbb
extends java.lang.Object
implements javax.slee.Sbb, org.mobicents.slee.sipevent.server.subscription.SubscriptionControlSbbLocalObject

Sbb to control subscriptions of sip events in a dialog

Author:
Eduardo Martins

Constructor Summary
SubscriptionControlSbb()
           
 
Method Summary
 void authorizationChanged(java.lang.String subscriber, java.lang.String notifier, java.lang.String eventPackage, java.lang.String eventId, int authorizationCode)
           
abstract  void fireInternalNotifyEvent(org.mobicents.slee.sipevent.server.internal.InternalNotifyEvent event, javax.slee.ActivityContextInterface aci, javax.slee.Address address)
          Used to fire events to notify the right sbb entity of a state change
 javax.slee.facilities.ActivityContextNamingFacility getActivityContextNamingfacility()
           
 javax.sip.address.AddressFactory getAddressFactory()
           
 SubscriptionControlManagementMBean getConfiguration()
          Retrieves the current configuration for this component from an MBean
 javax.persistence.EntityManager getEntityManager()
           
abstract  javax.slee.ChildRelation getEventListControlChildRelation()
           
 org.mobicents.slee.sipevent.server.subscription.EventListSubscriptionControlSbbLocalObject getEventListControlChildSbb()
           
abstract  org.mobicents.slee.sipevent.server.subscription.EventListSubscriptionControlSbbLocalObject getEventListControlChildSbbCMP()
           
 javax.sip.header.HeaderFactory getHeaderFactory()
           
abstract  javax.slee.ChildRelation getImplementedControlChildRelation()
           
 org.mobicents.slee.sipevent.server.subscription.ImplementedSubscriptionControlSbbLocalObject getImplementedControlChildSbb()
           
abstract  org.mobicents.slee.sipevent.server.subscription.ImplementedSubscriptionControlSbbLocalObject getImplementedControlChildSbbCMP()
           
 InternalSubscriptionHandler getInternalSubscriptionHandler()
           
 javax.sip.message.MessageFactory getMessageFactory()
           
 javax.slee.nullactivity.NullActivityContextInterfaceFactory getNullACIFactory()
           
 javax.slee.nullactivity.NullActivityFactory getNullActivityFactory()
           
abstract  org.mobicents.slee.sipevent.server.subscription.SubscriptionClientControlParentSbbLocalObject getParentSbbCMP()
           
 javax.slee.SbbContext getSbbContext()
           
 net.java.slee.resource.sip.SipActivityContextInterfaceFactory getSipActivityContextInterfaceFactory()
           
 net.java.slee.resource.sip.SleeSipProvider getSipProvider()
           
 SipSubscriptionHandler getSipSubscribeHandler()
           
 org.mobicents.slee.sipevent.server.subscription.pojo.Subscription getSubscription(org.mobicents.slee.sipevent.server.subscription.pojo.SubscriptionKey key)
           
 javax.slee.facilities.TimerFacility getTimerFacility()
           
 WInfoSubscriptionHandler getWInfoSubscriptionHandler()
           
 void newRlsService(java.lang.String uri)
           
 void newSubscriptionAuthorization(java.lang.String subscriber, java.lang.String subscriberDisplayName, java.lang.String notifier, org.mobicents.slee.sipevent.server.subscription.pojo.SubscriptionKey key, int expires, int responseCode, boolean eventList, javax.sip.ServerTransaction serverTransaction)
           
 void notifyEventListSubscriber(org.mobicents.slee.sipevent.server.subscription.pojo.SubscriptionKey key, org.mobicents.slee.sipevent.server.subscription.eventlist.MultiPart multiPart)
           
 void notifySubscriber(org.mobicents.slee.sipevent.server.subscription.pojo.SubscriptionKey key, java.lang.Object content, javax.sip.header.ContentTypeHeader contentTypeHeader)
           
 void notifySubscribers(java.lang.String notifier, java.lang.String eventPackage, java.lang.Object content, javax.sip.header.ContentTypeHeader contentTypeHeader)
           
 void onActivityEndEvent(javax.slee.ActivityEndEvent event, javax.slee.ActivityContextInterface aci)
          If it's a service activity must be the one for this service.
 void onInternalNotifyEvent(org.mobicents.slee.sipevent.server.internal.InternalNotifyEvent 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 onServiceStartedEvent(javax.slee.serviceactivity.ServiceStartedEvent event, javax.slee.ActivityContextInterface aci)
          if event is for this service starts mbean
 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 onTimerEvent(javax.slee.facilities.TimerEvent event, javax.slee.ActivityContextInterface aci)
          a timer has occurred on a subscription
 void removeSubscriptionData(javax.persistence.EntityManager entityManager, org.mobicents.slee.sipevent.server.subscription.pojo.Subscription subscription, javax.sip.Dialog dialog, javax.slee.ActivityContextInterface aci, org.mobicents.slee.sipevent.server.subscription.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()
           
abstract  void setEventListControlChildSbbCMP(org.mobicents.slee.sipevent.server.subscription.EventListSubscriptionControlSbbLocalObject value)
           
abstract  void setImplementedControlChildSbbCMP(org.mobicents.slee.sipevent.server.subscription.ImplementedSubscriptionControlSbbLocalObject value)
           
 void setParentSbb(org.mobicents.slee.sipevent.server.subscription.SubscriptionClientControlParentSbbLocalObject parentSbb)
           
abstract  void setParentSbbCMP(org.mobicents.slee.sipevent.server.subscription.SubscriptionClientControlParentSbbLocalObject value)
           
 void setSbbContext(javax.slee.SbbContext sbbContext)
          SbbObject's context setting
 void setSubscriptionTimerAndPersistSubscription(javax.persistence.EntityManager entityManager, org.mobicents.slee.sipevent.server.subscription.pojo.Subscription subscription, long delay, javax.slee.ActivityContextInterface aci)
           
 void subscribe(java.lang.String subscriber, java.lang.String subscriberDisplayName, java.lang.String notifier, 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
 
Methods inherited from interface javax.slee.SbbLocalObject
getSbbPriority, isIdentical, remove, setSbbPriority
 
Methods inherited from interface javax.slee.SbbLocalObject
getSbbPriority, isIdentical, remove, setSbbPriority
 
Methods inherited from interface javax.slee.SbbLocalObject
getSbbPriority, isIdentical, remove, setSbbPriority
 

Constructor Detail

SubscriptionControlSbb

public SubscriptionControlSbb()
Method Detail

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()

getConfiguration

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

Returns:

getEntityManager

public javax.persistence.EntityManager getEntityManager()

setParentSbb

public void setParentSbb(org.mobicents.slee.sipevent.server.subscription.SubscriptionClientControlParentSbbLocalObject parentSbb)
Specified by:
setParentSbb in interface org.mobicents.slee.sipevent.server.subscription.SubscriptionClientControlSbbLocalObject

getParentSbbCMP

public abstract org.mobicents.slee.sipevent.server.subscription.SubscriptionClientControlParentSbbLocalObject getParentSbbCMP()

setParentSbbCMP

public abstract void setParentSbbCMP(org.mobicents.slee.sipevent.server.subscription.SubscriptionClientControlParentSbbLocalObject value)

getImplementedControlChildRelation

public abstract javax.slee.ChildRelation getImplementedControlChildRelation()

getImplementedControlChildSbbCMP

public abstract org.mobicents.slee.sipevent.server.subscription.ImplementedSubscriptionControlSbbLocalObject getImplementedControlChildSbbCMP()

setImplementedControlChildSbbCMP

public abstract void setImplementedControlChildSbbCMP(org.mobicents.slee.sipevent.server.subscription.ImplementedSubscriptionControlSbbLocalObject value)

getImplementedControlChildSbb

public org.mobicents.slee.sipevent.server.subscription.ImplementedSubscriptionControlSbbLocalObject getImplementedControlChildSbb()

getEventListControlChildRelation

public abstract javax.slee.ChildRelation getEventListControlChildRelation()

getEventListControlChildSbbCMP

public abstract org.mobicents.slee.sipevent.server.subscription.EventListSubscriptionControlSbbLocalObject getEventListControlChildSbbCMP()

setEventListControlChildSbbCMP

public abstract void setEventListControlChildSbbCMP(org.mobicents.slee.sipevent.server.subscription.EventListSubscriptionControlSbbLocalObject value)

getEventListControlChildSbb

public org.mobicents.slee.sipevent.server.subscription.EventListSubscriptionControlSbbLocalObject getEventListControlChildSbb()

onServiceStartedEvent

public void onServiceStartedEvent(javax.slee.serviceactivity.ServiceStartedEvent event,
                                  javax.slee.ActivityContextInterface aci)
if event is for this service starts mbean


onActivityEndEvent

public void onActivityEndEvent(javax.slee.ActivityEndEvent event,
                               javax.slee.ActivityContextInterface aci)
If it's a service activity must be the one for this service. It then closes the jpa EM factory and tops the MBean

Parameters:
event -
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 -

onInternalNotifyEvent

public void onInternalNotifyEvent(org.mobicents.slee.sipevent.server.internal.InternalNotifyEvent event,
                                  javax.slee.ActivityContextInterface aci)

newSubscriptionAuthorization

public void newSubscriptionAuthorization(java.lang.String subscriber,
                                         java.lang.String subscriberDisplayName,
                                         java.lang.String notifier,
                                         org.mobicents.slee.sipevent.server.subscription.pojo.SubscriptionKey key,
                                         int expires,
                                         int responseCode,
                                         boolean eventList,
                                         javax.sip.ServerTransaction serverTransaction)
Specified by:
newSubscriptionAuthorization in interface org.mobicents.slee.sipevent.server.subscription.ImplementedSubscriptionControlParentSbbLocalObject

notifySubscribers

public void notifySubscribers(java.lang.String notifier,
                              java.lang.String eventPackage,
                              java.lang.Object content,
                              javax.sip.header.ContentTypeHeader contentTypeHeader)
Specified by:
notifySubscribers in interface org.mobicents.slee.sipevent.server.subscription.ImplementedSubscriptionControlParentSbbLocalObject

notifySubscriber

public void notifySubscriber(org.mobicents.slee.sipevent.server.subscription.pojo.SubscriptionKey key,
                             java.lang.Object content,
                             javax.sip.header.ContentTypeHeader contentTypeHeader)
Specified by:
notifySubscriber in interface org.mobicents.slee.sipevent.server.subscription.ImplementedSubscriptionControlParentSbbLocalObject

authorizationChanged

public void authorizationChanged(java.lang.String subscriber,
                                 java.lang.String notifier,
                                 java.lang.String eventPackage,
                                 java.lang.String eventId,
                                 int authorizationCode)
Specified by:
authorizationChanged in interface org.mobicents.slee.sipevent.server.subscription.ImplementedSubscriptionControlParentSbbLocalObject

notifyEventListSubscriber

public void notifyEventListSubscriber(org.mobicents.slee.sipevent.server.subscription.pojo.SubscriptionKey key,
                                      org.mobicents.slee.sipevent.server.subscription.eventlist.MultiPart multiPart)
Specified by:
notifyEventListSubscriber in interface org.mobicents.slee.sipevent.server.subscription.EventListSubscriptionControlParentSbbLocalObject

getSubscription

public org.mobicents.slee.sipevent.server.subscription.pojo.Subscription getSubscription(org.mobicents.slee.sipevent.server.subscription.pojo.SubscriptionKey key)
Specified by:
getSubscription in interface org.mobicents.slee.sipevent.server.subscription.EventListSubscriptionControlParentSbbLocalObject

newRlsService

public void newRlsService(java.lang.String uri)
Specified by:
newRlsService in interface org.mobicents.slee.sipevent.server.subscription.EventListSubscriptionControlParentSbbLocalObject

subscribe

public void subscribe(java.lang.String subscriber,
                      java.lang.String subscriberDisplayName,
                      java.lang.String notifier,
                      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 org.mobicents.slee.sipevent.server.subscription.SubscriptionClientControlSbbLocalObject

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 org.mobicents.slee.sipevent.server.subscription.SubscriptionClientControlSbbLocalObject

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 org.mobicents.slee.sipevent.server.subscription.SubscriptionClientControlSbbLocalObject

setSubscriptionTimerAndPersistSubscription

public void setSubscriptionTimerAndPersistSubscription(javax.persistence.EntityManager entityManager,
                                                       org.mobicents.slee.sipevent.server.subscription.pojo.Subscription subscription,
                                                       long delay,
                                                       javax.slee.ActivityContextInterface aci)

removeSubscriptionData

public void removeSubscriptionData(javax.persistence.EntityManager entityManager,
                                   org.mobicents.slee.sipevent.server.subscription.pojo.Subscription subscription,
                                   javax.sip.Dialog dialog,
                                   javax.slee.ActivityContextInterface aci,
                                   org.mobicents.slee.sipevent.server.subscription.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

fireInternalNotifyEvent

public abstract void fireInternalNotifyEvent(org.mobicents.slee.sipevent.server.internal.InternalNotifyEvent 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 -


Copyright © 2009. All Rights Reserved.