Package org.sblim.slp

Class ServiceLocationManager


  • public class ServiceLocationManager
    extends java.lang.Object
    The ServiceLocationManager manages access to the service location framework. Clients obtain the Locator and Advertiser objects for UA and SA, and a Vector of known scope names from the ServiceLocationManager.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Vector findScopes()
      Returns an List of strings with all available scope names.
      static Advertiser getAdvertiser​(java.util.Locale pLocale)
      Return an Advertiser object for the given language locale.
      static Locator getLocator​(java.util.Locale pLocale)
      Return a Locator object for the given language Locale.
      static int getRefreshInterval()
      Returns the maximum across all DAs of the min-refresh-interval attribute.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ServiceLocationManager

        public ServiceLocationManager()
    • Method Detail

      • getRefreshInterval

        public static int getRefreshInterval()
                                      throws ServiceLocationException
        Returns the maximum across all DAs of the min-refresh-interval attribute. This value satisfies the advertised refresh interval bounds for all DAs, and, if used by the SA, assures that no refresh registration will be rejected. If no DA advertises a min-refresh-interval attribute, a value of 0 is returned. Not yet implemented
        Returns:
        The minimum refresh interval
        Throws:
        ServiceLocationException
      • findScopes

        public static java.util.Vector findScopes()
                                           throws ServiceLocationException
        Returns an List of strings with all available scope names. The list of scopes comes from a variety of sources, see Section 2.1 for the scope discovery algorithm. There is always at least one string in the Vector, the default scope, "DEFAULT". Not yet implemented
        Returns:
        A Vector containing the scopes
        Throws:
        ServiceLocationException
      • getLocator

        public static Locator getLocator​(java.util.Locale pLocale)
                                  throws ServiceLocationException
        Return a Locator object for the given language Locale. If the implementation does not support UA functionality, returns null.
        Parameters:
        pLocale - The language locale of the Locator. The default SLP locale is used if null.
        Returns:
        The Locator
        Throws:
        ServiceLocationException
      • getAdvertiser

        public static Advertiser getAdvertiser​(java.util.Locale pLocale)
                                        throws ServiceLocationException
        Return an Advertiser object for the given language locale. If the implementation does not support SA functionality, returns null.
        Parameters:
        pLocale - The language locale of the Advertiser. The default SLP locale is used if null.
        Returns:
        The advertiser
        Throws:
        ServiceLocationException