public class DefaultContextSubscriber extends ContextSubscriber
ContextSubscriber
which calls back an
IContextCallback
if receives a ContextEvent.busResourceURI, owner, theBus
Constructor and Description |
---|
DefaultContextSubscriber(ModuleContext context,
ContextEventPattern[] initialSubscriptions,
IContextCallback callback) |
Modifier and Type | Method and Description |
---|---|
void |
communicationChannelBroken()
Method to be called when the communication of the Subsccriber with the
Context Bus is lost.
|
void |
handleContextEvent(ContextEvent event)
This methods just logs the received
ContextEvent and forwards it
if the callback field is not null. |
addNewRegParams, busDyingOut, getAllProvisions, getMyID, handleEvent, removeMatchingRegParams
close, getComment, getLabel, getType, getURI, setComment, setLabel
public DefaultContextSubscriber(ModuleContext context, ContextEventPattern[] initialSubscriptions, IContextCallback callback)
public void communicationChannelBroken()
ContextSubscriber
communicationChannelBroken
in class ContextSubscriber
public final void handleContextEvent(ContextEvent event)
ContextEvent
and forwards it
if the callback field is not null.handleContextEvent
in class ContextSubscriber
event
- The Context Event that matched the registered PatternsCopyright © 2018 universAAL Consortium. All rights reserved.