
public class DummySpaceManager extends Object implements SpaceManager
COMUNICATION_TIMEOUT_KEY, COMUNICATION_TIMEOUT_VALUE, DEFAULT_PEER_ROLE, PEER_ID_FILE| Constructor and Description |
|---|
DummySpaceManager(PeerCard myCard) |
| Modifier and Type | Method and Description |
|---|---|
void |
addSpaceListener(SpaceListener arg0)
Add a new Space listener.
|
void |
dispose()
Release all the resources
|
Map<String,SpaceDescriptor> |
getManagedSpaces()
This method return a map of Space managed by this MW instance
|
MatchingResult |
getMatchingPeers(Map<String,Serializable> arg0)
A method for identifying a possible set of Peer in the 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 For each key of the Map with null value, an
attribute with any value must be available on the matching Peer
For each key of the Map with a not null value,
an attribute with same value must be available on the matching Peer. |
PeerCard |
getMyPeerCard()
This method returns the PeerCard of the current MW instance
|
Map<String,Serializable> |
getPeerAttributes(List<String> arg0,
PeerCard arg1) |
Map<String,PeerCard> |
getPeers()
This method return the list of neighborhood peers joined to the current
Space.
NOTE: The list does not contains the invoker |
SpaceDescriptor |
getSpaceDescriptor()
This method returns the SpaceDescriptor of the Space where the MW
belongs to or null if the mw instance does not join to any Space.
|
Set<SpaceCard> |
getSpaces()
This method returns the list of Space discovered
|
boolean |
init()
Initialize the Space Manager
|
void |
join(SpaceCard arg0)
method to join an existing Space according the configuration file: -to
configure the peering channel -to send a join request -to receive the
join response -to get the SpaceDescriptor -to configure the
communication channels
|
void |
leaveSpace(SpaceDescriptor arg0)
Method used to leave an Space
|
void |
loadConfigurations(Dictionary arg0)
This method sets all the configurations for the SpaceManager
|
void |
removeSpaceListener(SpaceListener arg0)
Remove a Space Listener
|
public DummySpaceManager(PeerCard myCard)
myCard - public void dispose()
Managerpublic boolean init()
Managerpublic void loadConfigurations(Dictionary arg0)
ManagerloadConfigurations in interface Managerarg0 - Dictionary of configurationspublic void addSpaceListener(SpaceListener arg0)
SpaceManageraddSpaceListener in interface SpaceManagerpublic SpaceDescriptor getSpaceDescriptor()
SpaceManagergetSpaceDescriptor in interface SpaceManagerpublic Set<SpaceCard> getSpaces()
SpaceManagergetSpaces in interface SpaceManagerpublic Map<String,SpaceDescriptor> getManagedSpaces()
SpaceManagergetManagedSpaces in interface SpaceManagerpublic MatchingResult getMatchingPeers(Map<String,Serializable> arg0)
SpaceManagerMap with null value, an
attribute with any value must be available on the matching PeerMap with a not null value,
an attribute with same value must be available on the matching Peer. The
#equals(Object) is used for checking if the value are the
sameMap filter is set to { container=Karaf, tool=OSGI,
version=null }MatchingResult will contain the peers C
and E, while the other were discarded because
getMatchingPeers in interface SpaceManagerarg0 - a Map that contains a pair of String as Key
and Object as value which will be used for looking for
matching among the one available on the spaceMatchingResult representing the filtering resultpublic PeerCard getMyPeerCard()
SpaceManagergetMyPeerCard in interface SpaceManagerpublic Map<String,Serializable> getPeerAttributes(List<String> arg0, PeerCard arg1)
getPeerAttributes in interface SpaceManagerarg0 - The list of attribute to get value,arg1 - PeerCard the peer card that identifies the peer that
we want to read attribute fromMap with the pair String, Serializable
representing the attribute requested along with its value.public Map<String,PeerCard> getPeers()
SpaceManagergetPeers in interface SpaceManagerpublic void join(SpaceCard arg0)
SpaceManagerjoin in interface SpaceManagerpublic void leaveSpace(SpaceDescriptor arg0)
SpaceManagerleaveSpace in interface SpaceManagerpublic void removeSpaceListener(SpaceListener arg0)
SpaceManagerremoveSpaceListener in interface SpaceManagerCopyright © 2018 universAAL Consortium. All rights reserved.