public interface SpaceManager extends Manager
Modifier and Type | Field and Description |
---|---|
static String |
COMUNICATION_TIMEOUT_KEY |
static String |
COMUNICATION_TIMEOUT_VALUE |
static PeerRole |
DEFAULT_PEER_ROLE |
static String |
PEER_ID_FILE |
Modifier and Type | Method and Description |
---|---|
void |
addSpaceListener(SpaceListener listener)
Add a new Space listener.
|
Map<String,SpaceDescriptor> |
getManagedSpaces()
This method return a map of Space managed by this MW instance
|
MatchingResult |
getMatchingPeers(Map<String,Serializable> filter)
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> attributes,
PeerCard target) |
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
|
void |
join(SpaceCard spaceCard)
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 spaceDescriptor)
Method used to leave an Space
|
void |
removeSpaceListener(SpaceListener listener)
Remove a Space Listener
|
dispose, init, loadConfigurations
static final String COMUNICATION_TIMEOUT_KEY
static final String COMUNICATION_TIMEOUT_VALUE
static final PeerRole DEFAULT_PEER_ROLE
static final String PEER_ID_FILE
PeerCard getMyPeerCard()
Set<SpaceCard> getSpaces()
SpaceDescriptor getSpaceDescriptor()
Map<String,SpaceDescriptor> getManagedSpaces()
void join(SpaceCard spaceCard)
space
- Space to joinvoid leaveSpace(SpaceDescriptor spaceDescriptor)
spaceDescriptor
- Map<String,PeerCard> getPeers()
MatchingResult getMatchingPeers(Map<String,Serializable> filter)
Map
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
filter
- 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 resultMap<String,Serializable> getPeerAttributes(List<String> attributes, PeerCard target)
attributes
- The list of attribute to get value,target
- 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.void addSpaceListener(SpaceListener listener)
listener
- void removeSpaceListener(SpaceListener listener)
listener
- Copyright © 2018 universAAL Consortium. All rights reserved.