org.mobicents.slee.services.sip.location.cache
Class LocationService

java.lang.Object
  extended by org.mobicents.slee.services.sip.location.cache.LocationService

public class LocationService
extends java.lang.Object

Keeps track of mappings between User Agent SIP addresses and location bindings such as IP address This class acts as backend storage for this implementation of registrar service. Constructor has package access, so noone can ceaete instance of this class and mess up bindings, only Registrar class should do this.

Author:
F.Moggia, baranowb

Constructor Summary
LocationService()
           
 
Method Summary
 void addBinding(java.lang.String sipAddress, RegistrationBinding binding)
           
 java.util.Map getBindings(java.lang.String sipAddress)
          Return copy of map containing registration bindings
 java.util.Set getRegistered()
          Returns set of sip addresses of registered users.
 void removeBinding(java.lang.String sipAddress, java.lang.String sipContact)
           
 void setBindings(java.lang.String sipAddress, java.util.Map bindings)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocationService

public LocationService()
Method Detail

getBindings

public java.util.Map getBindings(java.lang.String sipAddress)
                          throws LocationServiceException
Return copy of map containing registration bindings

Parameters:
sipAddress - - address for which we want to retrieve bindings
Returns:
map(String,RegistrationBinding)
Throws:
LocationServiceException

setBindings

public void setBindings(java.lang.String sipAddress,
                        java.util.Map bindings)
                 throws LocationServiceException
Deprecated. 

Use add and remove.

Parameters:
sipAddress -
bindings -
Throws:
LocationServiceException

addBinding

public void addBinding(java.lang.String sipAddress,
                       RegistrationBinding binding)
                throws LocationServiceException
Parameters:
sipAddress - - sip address for which binding will be added
binding - - bindings to be added for ueser
Throws:
LocationServiceException - - thrown when backend storage fails in some manner

removeBinding

public void removeBinding(java.lang.String sipAddress,
                          java.lang.String sipContact)
                   throws LocationServiceException
Parameters:
sipAddress - - user for which we will perform remove.
sipContact - - contact address that will be removed for this user
Throws:
LocationServiceException - - thrown when backend storage fails in some manner

getRegistered

public java.util.Set getRegistered()
Returns set of sip addresses of registered users.



Copyright © 2008. All Rights Reserved.