public interface SpaceModule extends Module
Modifier and Type | Method and Description |
---|---|
void |
addPeer(SpaceDescriptor spaceDescriptor,
PeerCard peer)
This method allows to add a new Peer to the Space.
|
void |
announceNewPeer(SpaceCard spaceCard,
PeerCard peerCard)
This method propagates the event of new PeerAdded to the whole Space
|
void |
configureSpaceChannel()
This method configures the channel used in order to send/receive
Space messages
|
void |
destroySpace(SpaceCard spaceCard)
Destroy a Space
|
List<String> |
getPeersAddress()
This method fetches the list of peer address joining to the same
Space
|
List<SpaceCard> |
getSpaces()
This method fetches a list of Spaces without any filter
|
List<SpaceCard> |
getSpaces(Dictionary<String,String> filters)
This method fetches a list of Spaces according to a filter
|
void |
joinSpace(PeerCard spaceCoordinator,
SpaceCard spaceCard)
This method allows to join to an existing Space
|
void |
leaveSpace(PeerCard spaceCoordinator,
SpaceCard spaceCard)
This method allows to leave a Space
|
void |
messageFromSpace(SpaceMessage message,
PeerCard sender)
This method is called as soon as an SpaceMessage has been received
|
void |
newSpace(SpaceCard spaceCard)
This method creates a new Space
|
void |
renewSpace(SpaceCard spaceCard)
This method renews the Space
|
void |
requestPeerCard(SpaceDescriptor spaceDescriptor,
String peerAddress)
This method allows to send a request for the PeerCard of the peer with
the specified address
|
void |
requestToLeave(SpaceDescriptor spaceDescriptor)
This method announces to all the peers to leave the space
|
dispose, getDescription, getName, getProvider, getVersion, init, loadConfigurations
List<SpaceCard> getSpaces()
List<SpaceCard> getSpaces(Dictionary<String,String> filters)
filters
- A set of key, value pairs for filtering the Spacesvoid newSpace(SpaceCard spaceCard)
configurations
- The configuration parameters for the Spacevoid renewSpace(SpaceCard spaceCard)
spaceCard
- void destroySpace(SpaceCard spaceCard)
spaceCard
- Space to destroyvoid joinSpace(PeerCard spaceCoordinator, SpaceCard spaceCard)
spaceCoordinator
- The PeerCard of the Space coordinator to which to sent the
requestspaceCard
- The SpaceCard of the space the peer aims to joinvoid leaveSpace(PeerCard spaceCoordinator, SpaceCard spaceCard)
spaceCard
- Space Card of the Space to leavevoid requestToLeave(SpaceDescriptor spaceDescriptor)
spaceDescriptor
- void requestPeerCard(SpaceDescriptor spaceDescriptor, String peerAddress)
peerAddress
- the address of the peerspaceDescriptor
- the Space descriptorvoid messageFromSpace(SpaceMessage message, PeerCard sender)
message
- void addPeer(SpaceDescriptor spaceDescriptor, PeerCard peer)
spaceDescriptor
- All the information regarding the Space for the new Peerpeer
- The Peer to add to the Spacevoid announceNewPeer(SpaceCard spaceCard, PeerCard peerCard)
spaceCard
- The Space where to propagate the eventpeerCard
- The new peer addedvoid configureSpaceChannel()
Copyright © 2018 universAAL Consortium. All rights reserved.