org.universAAL.middleware.managers.api
Interface AALSpaceManager

Package class diagram package AALSpaceManager
All Superinterfaces:
Manager
All Known Implementing Classes:
AALSpaceManagerImpl

public interface AALSpaceManager
extends Manager

AALSpace manager interface. These methods are managing an AALSpace

Author:
Michele Girolami, Stefano "Kismet" Lenzi

Field Summary
static String COMUNICATION_TIMEOUT_KEY
           
static String COMUNICATION_TIMEOUT_VALUE
           
static PeerRole DEFAULT_PEER_ROLE
           
static String PEER_ID_FILE
           
 
Method Summary
 void addAALSpaceListener(AALSpaceListener listener)
          Add a new AAL Space listener.
 AALSpaceDescriptor getAALSpaceDescriptor()
          This method returns the AALSpaceDescriptor of the AALSpace where the MW belongs to or null if the mw instance does not join to any AAL Space.
 Set<AALSpaceCard> getAALSpaces()
          This method returns the list of AALSpace discovered
 Map<String,AALSpaceDescriptor> getManagedAALSpaces()
          This method return a map of AALSpace managed by this MW instance
 MatchingResult getMatchingPeers(Map<String,Serializable> filter)
          A method for identifying a possible set of Peer in the AAL space that can be used for installing a part of the universAAL application.
 PeerCard getMyPeerCard()
          This method returns the PeerCard of the current MW instance
 Map<String,Serializable> getPeerAttributes(List<String> attributes, PeerCard target)
           
 Map<String,PeerCard> getPeers()
          This method return the list of neighborhood peers joined to the current AALSpace.
 void join(AALSpaceCard spaceCard)
          method to join an existing AALSpace according the configuration file: -to configure the peering channel -to send a join request -to receive the join response -to get the AALSpaceDescriptor -to configure the communication channels
 void leaveAALSpace(AALSpaceDescriptor spaceDescriptor)
          Method used to leave an AALSpace
 void removeAALSpaceListener(AALSpaceListener listener)
          Remove an AAL Space Listener
 
Methods inherited from interface org.universAAL.middleware.managers.api.Manager
dispose, init, loadConfigurations
 

Field Detail

COMUNICATION_TIMEOUT_KEY

static final String COMUNICATION_TIMEOUT_KEY
See Also:
Constant Field Values

COMUNICATION_TIMEOUT_VALUE

static final String COMUNICATION_TIMEOUT_VALUE
See Also:
Constant Field Values

DEFAULT_PEER_ROLE

static final PeerRole DEFAULT_PEER_ROLE

PEER_ID_FILE

static final String PEER_ID_FILE
See Also:
Constant Field Values
Method Detail

getMyPeerCard

PeerCard getMyPeerCard()
This method returns the PeerCard of the current MW instance

Returns:
PeerCard

getAALSpaces

Set<AALSpaceCard> getAALSpaces()
This method returns the list of AALSpace discovered

Returns:
Set of AALSpace found

getAALSpaceDescriptor

AALSpaceDescriptor getAALSpaceDescriptor()
This method returns the AALSpaceDescriptor of the AALSpace where the MW belongs to or null if the mw instance does not join to any AAL Space.

Returns:
AALSpaceDescriptor

getManagedAALSpaces

Map<String,AALSpaceDescriptor> getManagedAALSpaces()
This method return a map of AALSpace managed by this MW instance

Returns:

join

void join(AALSpaceCard spaceCard)
method to join an existing AALSpace according the configuration file: -to configure the peering channel -to send a join request -to receive the join response -to get the AALSpaceDescriptor -to configure the communication channels

Parameters:
space - AAL Space to join

leaveAALSpace

void leaveAALSpace(AALSpaceDescriptor spaceDescriptor)
Method used to leave an AALSpace

Parameters:
spaceDescriptor -

getPeers

Map<String,PeerCard> getPeers()
This method return the list of neighborhood peers joined to the current AALSpace.
NOTE: The list does not contains the invoker

Returns:
Map of peers: peerID, PeerCard

getMatchingPeers

MatchingResult getMatchingPeers(Map<String,Serializable> filter)
A method for identifying a possible set of Peer in the AAL space that can be used for installing a part of the universAAL application.
The matching algorithm returns only the Peer of the space that match the following rules

getPeerAttributes

Map<String,Serializable> getPeerAttributes(List<String> attributes,
                                           PeerCard target)
Parameters:
attributes - The list of attribute to get value,
target - PeerCard the peer card that identifies the peer that we want to read attribute from
Returns:
a Map with the pair String, Serializable representing the attribute requested along with its value.

addAALSpaceListener

void addAALSpaceListener(AALSpaceListener listener)
Add a new AAL Space listener.

Parameters:
listener -

removeAALSpaceListener

void removeAALSpaceListener(AALSpaceListener listener)
Remove an AAL Space Listener

Parameters:
listener -


Copyright © 2014 universAAL Consortium. All Rights Reserved.