org.universAAL.middleware.connectors.discovery.slp
Class SLPDiscoveryConnector

Package class diagram package SLPDiscoveryConnector
java.lang.Object
  extended by org.universAAL.middleware.connectors.discovery.slp.SLPDiscoveryConnector
All Implemented Interfaces:
Connector, DiscoveryConnector, SharedObjectListener

public class SLPDiscoveryConnector
extends Object
implements DiscoveryConnector, SharedObjectListener

Implementation of the SLP Discovery Connector

Author:
Michele Girolami, Giancarlo Riolo

Constructor Summary
SLPDiscoveryConnector(ModuleContext context)
           
 
Method Summary
 void addAALSpaceListener(ServiceListener listener)
           
 void announceAALSpace(AALSpaceCard card)
          This method implements how to announce an AALSpace by adopting the SLP protocol
 void deregisterAALSpace(AALSpaceCard spaceCard)
          De-register an AALSpace
 void dispose()
           
 List<AALSpaceCard> findAALSpace()
          Discovers all the AALSpace without a filter
 List<AALSpaceCard> findAALSpace(Dictionary<String,String> filters)
          This method finds an AALSpace by using the specified filter in the SLP network
 String getDescription()
           
 String getName()
           
 String getProvider()
           
 String getSDPPRotocol()
           
 String getVersion()
           
 boolean init()
           
 void loadConfigurations(Dictionary properties)
          This method allows the connector to obtain all the required configurations
 void removeAALSpaceListener(ServiceListener listener)
           
 void sharedObjectAdded(Object sharedObj, Object removeHook)
           
 void sharedObjectRemoved(Object removeHook)
           
 String toString()
          This method prints the Connector properties: name, version, description and provider
protected static Dictionary unmarshalServiceAttributes(ServiceLocationEnumeration attributes)
          This method converts the list of attributes as a Dictionary of properties.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SLPDiscoveryConnector

public SLPDiscoveryConnector(ModuleContext context)
Method Detail

init

public boolean init()
Specified by:
init in interface Connector

dispose

public void dispose()
Specified by:
dispose in interface Connector

announceAALSpace

public void announceAALSpace(AALSpaceCard card)
                      throws DiscoveryConnectorException
This method implements how to announce an AALSpace by adopting the SLP protocol

Specified by:
announceAALSpace in interface DiscoveryConnector
Throws:
DiscoveryConnectorException

deregisterAALSpace

public void deregisterAALSpace(AALSpaceCard spaceCard)
                        throws DiscoveryConnectorException
Description copied from interface: DiscoveryConnector
De-register an AALSpace

Specified by:
deregisterAALSpace in interface DiscoveryConnector
Throws:
DiscoveryConnectorException

findAALSpace

public List<AALSpaceCard> findAALSpace()
                                throws DiscoveryConnectorException
Description copied from interface: DiscoveryConnector
Discovers all the AALSpace without a filter

Specified by:
findAALSpace in interface DiscoveryConnector
Returns:
Throws:
DiscoveryConnectorException

findAALSpace

public List<AALSpaceCard> findAALSpace(Dictionary<String,String> filters)
                                throws DiscoveryConnectorException
This method finds an AALSpace by using the specified filter in the SLP network

Specified by:
findAALSpace in interface DiscoveryConnector
Returns:
Throws:
DiscoveryConnectorException

unmarshalServiceAttributes

protected static Dictionary unmarshalServiceAttributes(ServiceLocationEnumeration attributes)
                                                throws DiscoveryConnectorException
This method converts the list of attributes as a Dictionary of properties.

Parameters:
attributes -
Returns:
Throws:
DiscoveryConnectorException

loadConfigurations

public void loadConfigurations(Dictionary properties)
Description copied from interface: Connector
This method allows the connector to obtain all the required configurations

Specified by:
loadConfigurations in interface Connector

getDescription

public String getDescription()
Specified by:
getDescription in interface Connector

getName

public String getName()
Specified by:
getName in interface Connector

getProvider

public String getProvider()
Specified by:
getProvider in interface Connector

getVersion

public String getVersion()
Specified by:
getVersion in interface Connector

getSDPPRotocol

public String getSDPPRotocol()
Specified by:
getSDPPRotocol in interface DiscoveryConnector

toString

public String toString()
This method prints the Connector properties: name, version, description and provider

Overrides:
toString in class Object
Returns:

addAALSpaceListener

public void addAALSpaceListener(ServiceListener listener)
Specified by:
addAALSpaceListener in interface DiscoveryConnector

removeAALSpaceListener

public void removeAALSpaceListener(ServiceListener listener)
Specified by:
removeAALSpaceListener in interface DiscoveryConnector

sharedObjectAdded

public void sharedObjectAdded(Object sharedObj,
                              Object removeHook)
Specified by:
sharedObjectAdded in interface SharedObjectListener

sharedObjectRemoved

public void sharedObjectRemoved(Object removeHook)
Specified by:
sharedObjectRemoved in interface SharedObjectListener


Copyright © 2014 universAAL Consortium. All Rights Reserved.