public interface ContextBus
Modifier and Type | Method and Description |
---|---|
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
ContextPublisher s on all
instances of this bus in the current 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
|
void addNewRegParams(String memberID, ContextEventPattern[] registrParams)
registrParams
.memberID
- The ID of the subscriber or publisher registered to the
context busregistrParams
- 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 publishContextEventPattern[] getAllProvisions(String publisherID)
ContextPublisher
s on all
instances of this bus in the current Space. Only
ContextPublisher
s are allowed to call this method, hence they
must provide their member-ID so that the bus can check this.void removeMatchingRegParams(String memberID, ContextEventPattern[] oldRegistrParams)
addNewRegParams(String, ContextEventPattern[])
.void brokerContextEvent(String publisherID, ContextEvent event)
publisherID
- ID of the Publisher registered to the context busevent
- Context Event to forward through the busvoid unregister(String publisherID, ContextPublisher publisher)
publisherID
- ID of the Publisher registered to the context buspublisher
- The Publisher to unregister.void unregister(String subscriberID, ContextSubscriber subscriber)
subscriberID
- ID of the Subscriber registered to the context bussubscriber
- The Subscriber to unregister.Copyright © 2018 universAAL Consortium. All rights reserved.