org.universAAL.middleware.modules
Interface AALSpaceModule

Package class diagram package AALSpaceModule
All Superinterfaces:
Module
All Known Implementing Classes:
AALSpaceModuleImpl

public interface AALSpaceModule
extends Module

The implementations of this interface manage the AALSpace life-cycle: creation, update, destroy.

Author:
Michele Girolami

Method Summary
 void addPeer(AALSpaceDescriptor aalSpaceDescriptor, PeerCard peer)
          This method allows to add a new Peer to the AALSpace.
 void announceNewPeer(AALSpaceCard aalSpaceCard, PeerCard peerCard)
          This method propagates the event of new PeerAdded to the whole AALSpace
 void configureAALSpaceChannel(String group)
          This method configures the channel used in order to send/receive AAL Space messages
 void destroyAALSpace(AALSpaceCard aalSpaceCard)
          Destroy an AAL Space
 List<AALSpaceCard> getAALSpaces()
          This method fetches a list of AALSpaces without any filter
 List<AALSpaceCard> getAALSpaces(Dictionary<String,String> filters)
          This method fetches a list of AALSpaces according to a filter
 List<String> getPeersAddress()
          This method fetches the list of peer address joining to the same AAL Space
 void joinAALSpace(PeerCard spaceCoordinator, AALSpaceCard aalSpaceCard)
          This method allows to join to an existing AALSpace
 void leaveAALSpace(PeerCard spaceCoordinator, AALSpaceCard aalSpaceCard)
          This method allows to leave an AALSpace
 void messageFromSpace(AALSpaceMessage message, PeerCard sender)
          This method is called as soon as an AALSpaceMessage has been received
 void newAALSpace(AALSpaceCard aalSpaceCard)
          This method creates a new AALSpace
 void renewAALSpace(AALSpaceCard aalSpaceCard)
          This method renews the AALSpace
 void requestPeerCard(AALSpaceDescriptor spaceDescriptor, String peerAddress)
          This method allows to send a request for the PeerCard of the peer with the specified address
 void requestToLeave(AALSpaceDescriptor aalSpaceDescriptor)
          This method announces to all the peers to leave the AAL space
 
Methods inherited from interface org.universAAL.middleware.modules.Module
dispose, getDescription, getName, getProvider, getVersion, init, loadConfigurations
 

Method Detail

getAALSpaces

List<AALSpaceCard> getAALSpaces()
This method fetches a list of AALSpaces without any filter

Returns:
List of discovered AAL Spaces

getAALSpaces

List<AALSpaceCard> getAALSpaces(Dictionary<String,String> filters)
This method fetches a list of AALSpaces according to a filter

Parameters:
filters - A set of key, value pairs for filtering the AAL Spaces
Returns:

newAALSpace

void newAALSpace(AALSpaceCard aalSpaceCard)
This method creates a new AALSpace

Parameters:
configurations - The configuration parameters for the AALSpace

renewAALSpace

void renewAALSpace(AALSpaceCard aalSpaceCard)
This method renews the AALSpace

Parameters:
spaceCard -

destroyAALSpace

void destroyAALSpace(AALSpaceCard aalSpaceCard)
Destroy an AAL Space

Parameters:
spaceCard - AALSpace to destroy

joinAALSpace

void joinAALSpace(PeerCard spaceCoordinator,
                  AALSpaceCard aalSpaceCard)
This method allows to join to an existing AALSpace

Parameters:
spaceCoordinator - The PeerCard of the AALSpace coordinator to which to sent the request
spaceCard - The AALSpaceCard of the AAL space the peer aims to join

leaveAALSpace

void leaveAALSpace(PeerCard spaceCoordinator,
                   AALSpaceCard aalSpaceCard)
This method allows to leave an AALSpace

Parameters:
spaceCard - Space Card of the AALSpace to leave

requestToLeave

void requestToLeave(AALSpaceDescriptor aalSpaceDescriptor)
This method announces to all the peers to leave the AAL space

Parameters:
spaceDescriptor -

requestPeerCard

void requestPeerCard(AALSpaceDescriptor spaceDescriptor,
                     String peerAddress)
This method allows to send a request for the PeerCard of the peer with the specified address

Parameters:
peerAddress - the address of the peer
spaceDescriptor - the AAL Space descriptor

messageFromSpace

void messageFromSpace(AALSpaceMessage message,
                      PeerCard sender)
This method is called as soon as an AALSpaceMessage has been received

Parameters:
message -

addPeer

void addPeer(AALSpaceDescriptor aalSpaceDescriptor,
             PeerCard peer)
This method allows to add a new Peer to the AALSpace.

Parameters:
spaceDescriptor - All the information regarding the AALSpace for the new Peer
peer - The Peer to add to the AALSpace

announceNewPeer

void announceNewPeer(AALSpaceCard aalSpaceCard,
                     PeerCard peerCard)
This method propagates the event of new PeerAdded to the whole AALSpace

Parameters:
spaceCard - The AALSpace where to propagate the event
peerCard - The new peer added

configureAALSpaceChannel

void configureAALSpaceChannel(String group)
This method configures the channel used in order to send/receive AAL Space messages

Parameters:
group - Name of the group to use

getPeersAddress

List<String> getPeersAddress()
This method fetches the list of peer address joining to the same AAL Space

Parameters:
peers -
Returns:
The consolidated list of peers


Copyright © 2014 universAAL Consortium. All Rights Reserved.