org.universAAL.middleware.context
Interface ContextBus

Package class diagram package ContextBus
All Known Implementing Classes:
ContextBusImpl

public interface ContextBus

Interface for classes that wish to implement a Context Bus based on uAAL buses

Author:
mtazari - Saied Tazari

Method Summary
 void addNewRegParams(String memberID, ContextEventPattern[] registrParams)
          Allows the members of the context bus to provide registration parameters; for the meaning of the provided "registration parameters" see the explanation for the input parameter registrParams.
 void brokerContextEvent(String publisherID, ContextEvent event)
          Send a Context Event through the Context Bus
 ContextEventPattern[] getAllProvisions(String publisherID)
          Returns all provisions registered by all ContextPublishers on all instances of this bus in the current AAL Space.
 void removeMatchingRegParams(String memberID, ContextEventPattern[] oldRegistrParams)
          Removes registration parameters introduced previously through addNewRegParams(String, ContextEventPattern[]).
 void unregister(String publisherID, ContextPublisher publisher)
          Unregister a Context Publisher from the Context Bus
 void unregister(String subscriberID, ContextSubscriber subscriber)
          Unregister a Context Subscriber from the Context Bus
 

Method Detail

addNewRegParams

void addNewRegParams(String memberID,
                     ContextEventPattern[] registrParams)
Allows the members of the context bus to provide registration parameters; for the meaning of the provided "registration parameters" see the explanation for the input parameter registrParams.

Parameters:
memberID - The ID of the subscriber or publisher registered to the context bus
registrParams - If the memberID refers to a context subscriber, registrParams will be interpreted as the patterns of the context events to which the subscriber wants to subscribe, and if the memberID refers to a context publisher, it will be interpreted as the patterns of the context events that the publisher will publish

getAllProvisions

ContextEventPattern[] getAllProvisions(String publisherID)
Returns all provisions registered by all ContextPublishers on all instances of this bus in the current AAL Space. Only ContextPublishers are allowed to call this method, hence they must provide their member-ID so that the bus can check this.


removeMatchingRegParams

void removeMatchingRegParams(String memberID,
                             ContextEventPattern[] oldRegistrParams)
Removes registration parameters introduced previously through addNewRegParams(String, ContextEventPattern[]).


brokerContextEvent

void brokerContextEvent(String publisherID,
                        ContextEvent event)
Send a Context Event through the Context Bus

Parameters:
publisherID - ID of the Publisher registered to the context bus
event - Context Event to forward through the bus

unregister

void unregister(String publisherID,
                ContextPublisher publisher)
Unregister a Context Publisher from the Context Bus

Parameters:
publisherID - ID of the Publisher registered to the context bus
publisher - The Publisher to unregister.

unregister

void unregister(String subscriberID,
                ContextSubscriber subscriber)
Unregister a Context Subscriber from the Context Bus

Parameters:
subscriberID - ID of the Subscriber registered to the context bus
subscriber - The Subscriber to unregister.


Copyright © 2014 universAAL Consortium. All Rights Reserved.