ch.ethz.iks.slp.impl
Class AdvertiserImpl

Package class diagram package AdvertiserImpl
java.lang.Object
  extended by ch.ethz.iks.slp.impl.AdvertiserImpl
All Implemented Interfaces:
Advertiser

public final class AdvertiserImpl
extends Object
implements Advertiser

Implementation of the Advertiser that provides SLP SA functionality. If the configuration does not have to support SA functionalities, this class does not have to be included in the distribution.

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

Constructor Summary
AdvertiserImpl()
          Constructor for AdvertiserImpl.
AdvertiserImpl(Locale locale)
          Constructor for AdvertiserImpl.
 
Method Summary
 void addAttributes(ServiceURL url, Dictionary attributes)
          currently not supported.
 void deleteAttributes(ServiceURL url, Dictionary attributes)
          currently not supported.
 void deregister(ServiceURL url)
          deregister a service.
 void deregister(ServiceURL url, List scopes)
          deregister a service in some scopes.
 Locale getLocale()
          Get the locale of this instance.
 InetAddress getMyIP()
          Get the IP address of this machine that is configured as primary jSLP address.
 void register(ServiceURL url, Dictionary attributes)
          register a new service with the framework.
 void register(ServiceURL url, List scopes, Dictionary attributes)
          register a new service with the framework using scopes.
 void setLocale(Locale locale)
          Set the locale of this instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdvertiserImpl

public AdvertiserImpl()
Constructor for AdvertiserImpl.


AdvertiserImpl

public AdvertiserImpl(Locale locale)
Constructor for AdvertiserImpl.

Parameters:
theLocale - Locale.
Method Detail

getLocale

public Locale getLocale()
Get the locale of this instance.

Specified by:
getLocale in interface Advertiser
Returns:
Locale.
See Also:
Advertiser.getLocale()

setLocale

public void setLocale(Locale locale)
Set the locale of this instance.

Specified by:
setLocale in interface Advertiser
Parameters:
locale - the Locale.
See Also:
Advertiser#setLocale()

register

public void register(ServiceURL url,
                     Dictionary attributes)
              throws ServiceLocationException
register a new service with the framework.

Specified by:
register in interface Advertiser
Parameters:
url - the ServiceURL of the service.
attributes - a Dictionary of attributes.
Throws:
ServiceLocationException - if the registration has failed for any reason.
See Also:
Advertiser.register(ServiceURL, Dictionary)

register

public void register(ServiceURL url,
                     List scopes,
                     Dictionary attributes)
              throws ServiceLocationException
register a new service with the framework using scopes.

Specified by:
register in interface Advertiser
Parameters:
url - the ServiceURL of the service.
scopes - a List of scopes.
attributes - a Dictionary of attributes.
Throws:
ServiceLocationException - if the registration has failed for any reason.
See Also:
Advertiser.register(ServiceURL, List, Dictionary)

deregister

public void deregister(ServiceURL url)
                throws ServiceLocationException
deregister a service.

Specified by:
deregister in interface Advertiser
Parameters:
url - the ServiceURL of the service.
Throws:
ServiceLocationException - if the deregistration has failed for any reason.
See Also:
Advertiser.deregister(ServiceURL)

deregister

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

Specified by:
deregister in interface Advertiser
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:
Advertiser.deregister(ServiceURL, List)

addAttributes

public void addAttributes(ServiceURL url,
                          Dictionary attributes)
                   throws ServiceLocationException
currently not supported.

Specified by:
addAttributes in interface Advertiser
Parameters:
url - the serviceURL
attributes - the attributes to add.
Throws:
ServiceLocationException - always.
See Also:
Advertiser.addAttributes(ServiceURL, Dictionary)

deleteAttributes

public void deleteAttributes(ServiceURL url,
                             Dictionary attributes)
                      throws ServiceLocationException
currently not supported.

Specified by:
deleteAttributes in interface Advertiser
Parameters:
url - the serviceURL.
attributes - the attributes to delete.
Throws:
ServiceLocationException - always.
See Also:
Advertiser.deleteAttributes(ServiceURL, Dictionary)

getMyIP

public 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.

Specified by:
getMyIP in interface Advertiser
Returns:
the local InetAddress.


Copyright © 2014 universAAL Consortium. All Rights Reserved.