ch.ethz.iks.slp
Interface Advertiser


public interface Advertiser

Advertiser implements the SA properties of SLP. Services can be registered and deregistered. The SLP framework handles DA discovery.

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

Method Summary
 void addAttributes(ServiceURL url, java.util.Dictionary attributes)
          Not yet implemented.
 void deleteAttributes(ServiceURL url, java.util.Dictionary attributeIds)
          Not yet implemented.
 void deregister(ServiceURL url)
          Unregister a service with the SLP framework.
 void deregister(ServiceURL url, java.util.List scopes)
          deregister a service in some scopes.
 java.util.Locale getLocale()
          Returns the locale of this Advertiser instance.
 java.net.InetAddress getMyIP()
          Get the IP address of this machine that is configured as primary jSLP address.
 void register(ServiceURL url, java.util.Dictionary attributes)
          Register a service with the SLP framework.
 void register(ServiceURL url, java.util.List scopes, java.util.Dictionary attributes)
          Register a service with the SLP framework.
 void setLocale(java.util.Locale locale)
          Get the locale of this instance.
 

Method Detail

getLocale

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

Returns:
the current Locale.

setLocale

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

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

register

void register(ServiceURL url,
              java.util.Dictionary attributes)
              throws ServiceLocationException
Register a service with the SLP framework. The service will be registered with all known DAs that support the default scope and with the local SA registry for multicast discovery.

Parameters:
url - the ServiceURL of the service.
attributes - a Dictionary of attributes for the service. RFC 2614 proposes a Vector of attribute-value-pairs here but the Dictionary makes this implementation more close to OSGi.
Throws:
ServiceLocationException - in case that the registration failed for any reason.

register

void register(ServiceURL url,
              java.util.List scopes,
              java.util.Dictionary attributes)
              throws ServiceLocationException
Register a service with the SLP framework. The service will be registered with all known DAs that support at least one of the given scopes and with the local SA registry for multicast discovery.

Parameters:
url - the ServiceURL of the service.
scopes - a List of scope names as Strings.
attributes - a Dictionary of attributes for the service. RFC 2614 proposes a Vector of attribute-value-pairs here but the Dictionary makes this implementation more close to OSGi
Throws:
ServiceLocationException - in case that the registration failed for any reason.

deregister

void deregister(ServiceURL url)
                throws ServiceLocationException
Unregister a service with the SLP framework. The service will be unregistered with all known DAs in the scopes that it was registered in.

Parameters:
url - the ServiceURL of the service.
Throws:
ServiceLocationException - in case that the deregistration failed for any reason.

deregister

void deregister(ServiceURL url,
                java.util.List scopes)
                throws ServiceLocationException
deregister a service in some scopes.

Parameters:
url - the ServiceURL of the service.
scopes - the scopes.
Throws:
ServiceLocationException - if the deregistration has failed for any reason.
Since:
0.7.1
See Also:
deregister(ServiceURL, List)

addAttributes

void addAttributes(ServiceURL url,
                   java.util.Dictionary attributes)
                   throws ServiceLocationException
Not yet implemented. Add attributes to an already registered service. Allows incremental registration.

Parameters:
url - the ServiceURL of the service.
attributes - the attributes to be added.
Throws:
ServiceLocationException - whenever called.

deleteAttributes

void deleteAttributes(ServiceURL url,
                      java.util.Dictionary attributeIds)
                      throws ServiceLocationException
Not yet implemented. Remove attributes to an already registered service. Allows incremental registration.

Parameters:
url - the ServiceURL of the service.
attributeIds - the attributes to be removed.
Throws:
ServiceLocationException - whenever called.

getMyIP

java.net.InetAddress getMyIP()
Get the IP address of this machine that is configured as primary jSLP address. Can be used to register Services that are located on this host.

Returns:
the local InetAddress.


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