ch.ethz.iks.slp
Interface Locator


public interface Locator

Locator implements the UA properties of SLP. Services can be discovered by type or by URL, attributes of discovered services can be retrieved and service types can be listed.

Since:
0.1
Author:
Jan S. Rellermeyer, Systems Group, ETH Zurich

Method Summary
 ServiceLocationEnumeration findAttributes(ServiceType type, java.util.List scopes, java.util.List attributeIds)
          Find all services that match a ServiceType.
 ServiceLocationEnumeration findAttributes(ServiceURL url, java.util.List scopes, java.util.List attributeIds)
          Find all services that match a ServiceURL.
 ServiceLocationEnumeration findServices(ServiceType type, java.util.List scopes, java.lang.String searchFilter)
          Find all services that match a certain service type.
 ServiceLocationEnumeration findServiceTypes(java.lang.String namingAuthority, java.util.List scopes)
          Find all services types that are currently registered in the network.
 java.util.Locale getLocale()
          Returns the locale of this Locator instance.
 void setLocale(java.util.Locale locale)
          Get the locale of this instance.
 

Method Detail

getLocale

java.util.Locale getLocale()
Returns the locale of this Locator instance.

Returns:
the current Locale.

setLocale

void setLocale(java.util.Locale locale)
Get the locale of this instance.

Parameters:
locale - the Locale.
See Also:
Advertiser.getLocale()

findServiceTypes

ServiceLocationEnumeration findServiceTypes(java.lang.String namingAuthority,
                                            java.util.List scopes)
                                            throws ServiceLocationException
Find all services types that are currently registered in the network.

Parameters:
namingAuthority - the naming authority for the service type. If omitted, ALL Service Types are returned, regardless of Naming Authority. With the empty String (""), IANA will be assumed.
scopes - a List of scopes in that service types are to be discovered.
Returns:
a ServiceLocationEnumeration over the discovered ServiceTypes.
Throws:
ServiceLocationException - whenever called.

findServices

ServiceLocationEnumeration findServices(ServiceType type,
                                        java.util.List scopes,
                                        java.lang.String searchFilter)
                                        throws ServiceLocationException,
                                               java.lang.IllegalArgumentException
Find all services that match a certain service type.

Parameters:
type - the ServiceType.
scopes - A List of scope Strings, RFC 2614 uses Vector here but jSLP prefers the Collection Framework.
searchFilter - an RFC 1960 compliant String of a LDAP filter. RFC 2614 proposes the newer RFC 2254 style filters that adds support for extensible matches.
Returns:
a ServiceLocationEnumeration over the ServiceURLs of the found services.
Throws:
ServiceLocationException - in case of an exception in the underlying framework.
InvalidSyntaxException
java.lang.IllegalArgumentException

findAttributes

ServiceLocationEnumeration findAttributes(ServiceURL url,
                                          java.util.List scopes,
                                          java.util.List attributeIds)
                                          throws ServiceLocationException
Find all services that match a ServiceURL.

Parameters:
url - the ServiceURL.
scopes - A List of scopes Strings, RFC 2614 uses Vector here but jSLP prefers the Collection Framework.
attributeIds - A List of attribute-value-pairs like
 (key = value)
 
that must match. If null, no attribute constraints are applied.
Returns:
a ServiceLocationEnumeration over the ServiceURLs of the found services.
Throws:
ServiceLocationException - in case of an exception in the underlying framework.

findAttributes

ServiceLocationEnumeration findAttributes(ServiceType type,
                                          java.util.List scopes,
                                          java.util.List attributeIds)
                                          throws ServiceLocationException
Find all services that match a ServiceType.

Parameters:
type - the ServiceType.
scopes - A List of scope Strings, RFC 2614 uses Vector here but jSLP prefers the Collection Framework.
attributeIds - A List of attribute-value-pairs like
 (key = value)
 
that must match. If null, no attribute constraints are applied.
Returns:
a ServiceLocationEnumeration over the ServiceURLs of the found services.
Throws:
ServiceLocationException - in case of an exception in the underlying framework.


Copyright © 2008 Systems Group, ETH Zurich. All Rights Reserved.