org.mobicents.slee.services.sip.location
Class LocationSbb

java.lang.Object
  extended by org.mobicents.slee.services.sip.location.LocationSbb
All Implemented Interfaces:
javax.slee.Sbb, javax.slee.SbbLocalObject, LocationServiceManagementMBean, LocationSbbLocalObject, LocationService

public abstract class LocationSbb
extends java.lang.Object
implements javax.slee.Sbb, LocationSbbLocalObject


Field Summary
 
Fields inherited from interface org.mobicents.slee.services.sip.location.jmx.LocationServiceManagementMBean
MBEAN_NAME
 
Constructor Summary
LocationSbb()
           
 
Method Summary
 RegistrationBinding addBinding(java.lang.String sipAddress, javax.sip.address.Address contactAddress, java.lang.String comment, long expires, long registrationDate, float qValue, java.lang.String callId, long cSeq)
          Adds new contact binding for particular user..
abstract  RegistrationBindingActivityContextInterface asSbbActivityContextInterface(javax.slee.ActivityContextInterface aci)
           
 java.util.Map<javax.sip.address.Address,RegistrationBinding> getBindings(java.lang.String sipAddress)
          Returns map which contians mapping contactAddress->registrationBinding for particular user - address of record sip:nie@ma.mnie.tu
 java.util.Set<java.lang.String> getRegisteredUsers()
          Returns set of user that have registered - set contains adress of record for each user, something like sip:ala@kocia.domena.com
 void init()
          Starts the location service
 void onTimerEvent(javax.slee.facilities.TimerEvent timer, javax.slee.ActivityContextInterface aci)
          a registration expires
 void removeBinding(java.lang.String sipAddress, javax.sip.address.Address contactAddress)
          Removes contact address from user bindings.
 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)
           
 void shutdown()
          Shutdown the location service
 void unsetSbbContext()
           
 void updateBinding(RegistrationBinding registrationBinding)
          Updates the specified registration binding.
 
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 org.mobicents.slee.services.sip.location.jmx.LocationServiceManagementMBean
getContacts, getExpirationTime, getRegisteredUserCount
 

Constructor Detail

LocationSbb

public LocationSbb()
Method Detail

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

setSbbContext

public void setSbbContext(javax.slee.SbbContext sbbContext)
Specified by:
setSbbContext in interface javax.slee.Sbb

unsetSbbContext

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

asSbbActivityContextInterface

public abstract RegistrationBindingActivityContextInterface asSbbActivityContextInterface(javax.slee.ActivityContextInterface aci)

addBinding

public RegistrationBinding addBinding(java.lang.String sipAddress,
                                      javax.sip.address.Address contactAddress,
                                      java.lang.String comment,
                                      long expires,
                                      long registrationDate,
                                      float qValue,
                                      java.lang.String callId,
                                      long cSeq)
                               throws LocationServiceException
Description copied from interface: LocationService
Adds new contact binding for particular user..

Specified by:
addBinding in interface LocationService
Parameters:
sipAddress - - user address of record sip:ala@ma.kota.w.domu.com
contactAddress - - contact address - sip:+381243256
comment - - possible comment note
expires - - long - seconds for which this contact is to remain valid
registrationDate - - long - date when the registration was created/updated
qValue - - q parameter
callId - - call id
cSeq - - seq numbers
Returns:
- binding created in this operation
Throws:
LocationServiceException

getRegisteredUsers

public java.util.Set<java.lang.String> getRegisteredUsers()
                                                   throws LocationServiceException
Description copied from interface: LocationService
Returns set of user that have registered - set contains adress of record for each user, something like sip:ala@kocia.domena.com

Specified by:
getRegisteredUsers in interface LocationServiceManagementMBean
Specified by:
getRegisteredUsers in interface LocationService
Returns:
Set with registered users. It contains entries like "sip:316471@kocia.domena.au" or "sip:mobicents@gmail.com"
Throws:
LocationServiceException

getBindings

public java.util.Map<javax.sip.address.Address,RegistrationBinding> getBindings(java.lang.String sipAddress)
                                                                         throws LocationServiceException
Description copied from interface: LocationService
Returns map which contians mapping contactAddress->registrationBinding for particular user - address of record sip:nie@ma.mnie.tu

Specified by:
getBindings in interface LocationService
Returns:
Throws:
LocationServiceException

updateBinding

public void updateBinding(RegistrationBinding registrationBinding)
                   throws LocationServiceException
Description copied from interface: LocationService
Updates the specified registration binding.

Specified by:
updateBinding in interface LocationService
Throws:
LocationServiceException

removeBinding

public void removeBinding(java.lang.String sipAddress,
                          javax.sip.address.Address contactAddress)
                   throws LocationServiceException
Description copied from interface: LocationService
Removes contact address from user bindings.

Specified by:
removeBinding in interface LocationService
Parameters:
sipAddress - - sip:ala@kocia.domena.au
contactAddress - - sip:+481234567890
Throws:
LocationServiceException

onTimerEvent

public void onTimerEvent(javax.slee.facilities.TimerEvent timer,
                         javax.slee.ActivityContextInterface aci)
a registration expires

Parameters:
timer -
aci -

init

public void init()
Description copied from interface: LocationService
Starts the location service

Specified by:
init in interface LocationService

shutdown

public void shutdown()
Description copied from interface: LocationService
Shutdown the location service

Specified by:
shutdown in interface LocationService


Copyright © 2008. All Rights Reserved.