com.solers.slp
Class LocatorImpl

java.lang.Object
  |
  +--com.solers.slp.LocatorImpl
All Implemented Interfaces:
Locator

class LocatorImpl
extends Object
implements Locator

Implementation of SLP Locator interface.

Author:
Patrick Callis
See Also:
Locator

Field Summary
private  Locale _locale
           
private  NetworkManager _net
           
 
Constructor Summary
(package private) LocatorImpl(Locale locale)
           
 
Method Summary
 ServiceLocationEnumeration findAttributes(ServiceType type, Vector scopes, Vector attributeIds)
          Returns the attributes registered with a ServiceType.
 ServiceLocationEnumeration findAttributes(ServiceURL URL, Vector scopes, Vector attributeIds)
          Returns the attributes registered with a ServiceURL.
 ServiceLocationEnumeration findServices(ServiceType type, Vector scopes, String searchFilter)
          Finds all services of a particular type.
 ServiceLocationEnumeration findServiceTypes(String namingAuthority, Vector scopes)
          Finds all service types that have a registered URL.
 Locale getLocale()
          Returns the current locale of this Locator.
private static String scopeString(Vector scopes)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

_locale

private Locale _locale

_net

private NetworkManager _net
Constructor Detail

LocatorImpl

LocatorImpl(Locale locale)
Method Detail

getLocale

public Locale getLocale()
Description copied from interface: Locator
Returns the current locale of this Locator.
Specified by:
getLocale in interface Locator
Following copied from interface: com.solers.slp.Locator
Returns:
a Locale

findServiceTypes

public ServiceLocationEnumeration findServiceTypes(String namingAuthority,
                                                   Vector scopes)
                                            throws ServiceLocationException
Description copied from interface: Locator
Finds all service types that have a registered URL.
Specified by:
findServiceTypes in interface Locator
Following copied from interface: com.solers.slp.Locator
Parameters:
namingAuthority - the naming authority to search in, or empty string if all.
Returns:
ServiceLocationEnumeration of ServiceType objects.
Throws:
ServiceLocationException -  

findServices

public ServiceLocationEnumeration findServices(ServiceType type,
                                               Vector scopes,
                                               String searchFilter)
                                        throws ServiceLocationException
Description copied from interface: Locator
Finds all services of a particular type.
Specified by:
findServices in interface Locator
Following copied from interface: com.solers.slp.Locator
Parameters:
type - the ServiceType to search for.
scopes - list of scopes to look in.
searchFilter - an SLP search filter string.
Returns:
ServiceLocationEnumeration of ServiceURL objects.
Throws:
ServiceLocationException -  

findAttributes

public ServiceLocationEnumeration findAttributes(ServiceURL URL,
                                                 Vector scopes,
                                                 Vector attributeIds)
                                          throws ServiceLocationException
Description copied from interface: Locator
Returns the attributes registered with a ServiceURL.
Specified by:
findAttributes in interface Locator
Following copied from interface: com.solers.slp.Locator
Parameters:
URL - the ServiceURL to query.
scopes - the scopes to look in.
attributeIds - list of ids to return, or empty string if all.
Returns:
ServiceLocationEnumeration of ServiceLocationAttribute objects.
Throws:
ServiceLocationException -  

findAttributes

public ServiceLocationEnumeration findAttributes(ServiceType type,
                                                 Vector scopes,
                                                 Vector attributeIds)
                                          throws ServiceLocationException
Description copied from interface: Locator
Returns the attributes registered with a ServiceType.
Specified by:
findAttributes in interface Locator
Following copied from interface: com.solers.slp.Locator
Parameters:
type - the ServiceType to query.
scopes - the scopes to look in.
attributeIds - list of ids to return, or empty string if all.
Returns:
ServiceLocationEnumeration of ServiceLocationAttribute objects.
Throws:
ServiceLocationException -  

scopeString

private static String scopeString(Vector scopes)