org.universAAL.context.reasoner
Class CSubsMulti
java.lang.Object
org.universAAL.middleware.bus.member.BusMember
org.universAAL.middleware.bus.member.Subscriber
org.universAAL.middleware.context.ContextSubscriber
org.universAAL.context.reasoner.CSubsMulti
public class CSubsMulti
- extends ContextSubscriber
Class used to register multiple subscribers, each of them using just a single
mcontext event pattern, and having an associated SPARQL CONSTRUCT query. Each
patter is given by a restriction for the subject, the predicate and the
object for a mcontext-event at the bus, where the last two are optional. See
also the class Situation in the ontology for the reasoner.
- Author:
- alfiva, amarinc
Method Summary |
void |
communicationChannelBroken()
Method to be called when the communication of the Subsccriber with the
Context Bus is lost. |
void |
handleContextEvent(ContextEvent event)
Method to be called when an Event forwarded in the Context Bus matches
one of the Patterns registered by this Subscriber. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CSubsMulti
protected CSubsMulti(ModuleContext context,
ContextEventPattern[] initialSubscriptions,
String query)
- Create the subscriber
- Parameters:
mcontext
- the module mcontextinitialSubscriptions
- the mcontext event pattern to react toquery
- the query to execute when receiving an event
communicationChannelBroken
public void communicationChannelBroken()
- Description copied from class:
ContextSubscriber
- Method to be called when the communication of the Subsccriber with the
Context Bus is lost.
- Specified by:
communicationChannelBroken
in class ContextSubscriber
handleContextEvent
public void handleContextEvent(ContextEvent event)
- Description copied from class:
ContextSubscriber
- Method to be called when an Event forwarded in the Context Bus matches
one of the Patterns registered by this Subscriber.
- Specified by:
handleContextEvent
in class ContextSubscriber
- Parameters:
event
- The Context Event that matched the registered Patterns
Copyright © 2014 universAAL Consortium. All Rights Reserved.