org.universAAL.support.utils.context.mid
Class UtilSubscriber
java.lang.Object
org.universAAL.middleware.bus.member.BusMember
org.universAAL.middleware.bus.member.Subscriber
org.universAAL.middleware.context.ContextSubscriber
org.universAAL.support.utils.context.mid.UtilSubscriber
- Direct Known Subclasses:
- SubscriberExample, SubscriberExample
public abstract class UtilSubscriber
- extends ContextSubscriber
This abstract class can be extended to create a simple Context Subscriber.
This simple Subscriber extends the normal ContextSubscriber, but allows
specifying everything it needs in its constructor. Also because of this it
can be used as well with the native API to apply further restrictions and
configuration over it. Your class that extends this will receive the
specified events in the handleContextEvent method.
Example: A subscriber that listens for events of status of Heater Actuators.
subscriber = new SubscriberExample(context, HeaterActuator.MY_URI,
HeaterActuator.PROP_STATUS, null);
- Author:
- alfiva
Constructor Summary |
protected |
UtilSubscriber(ModuleContext context,
ManagedIndividual subj,
String predicate,
Object obj)
Create a simple Context Subscriber that will listen to the events
matching what is specified in the constructor. |
protected |
UtilSubscriber(ModuleContext context,
ManagedIndividual subj,
String predicate,
String objTypeURI)
Create a simple Context Subscriber that will listen to the events
matching what is specified in the constructor. |
protected |
UtilSubscriber(ModuleContext context,
String subjTypeURI,
String predicate,
Object obj)
Create a simple Context Subscriber that will listen to the events
matching what is specified in the constructor. |
protected |
UtilSubscriber(ModuleContext context,
String subjTypeURI,
String predicate,
String objTypeURI)
Create a simple Context Subscriber that will listen to the events
matching what is specified in the constructor. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UtilSubscriber
protected UtilSubscriber(ModuleContext context,
String subjTypeURI,
String predicate,
String objTypeURI)
- Create a simple Context Subscriber that will listen to the events
matching what is specified in the constructor.
- Parameters:
context
- The universAAL module context.subjTypeURI
- The type URI that the provided events subject must have. Null
for any.predicate
- The exact predicate that the provided events must equal. Null
for any.objTypeURI
- The type URI that the provided events object must have. Null
for any.
UtilSubscriber
protected UtilSubscriber(ModuleContext context,
ManagedIndividual subj,
String predicate,
String objTypeURI)
- Create a simple Context Subscriber that will listen to the events
matching what is specified in the constructor.
- Parameters:
context
- The universAAL module context.subj
- The exact instance that the provided events subject must
equal. Null for any.predicate
- The exact predicate that the provided events must equal. Null
for any.objTypeURI
- The type URI that the provided events object must have. Null
for any.
UtilSubscriber
protected UtilSubscriber(ModuleContext context,
ManagedIndividual subj,
String predicate,
Object obj)
- Create a simple Context Subscriber that will listen to the events
matching what is specified in the constructor.
- Parameters:
context
- The universAAL module context.subj
- The exact instance that the event subject must equal. Null for
any.predicate
- The exact predicate that the event must equal. Null for any.obj
- The exact instance that the event object must equal. Null for
any.
UtilSubscriber
protected UtilSubscriber(ModuleContext context,
String subjTypeURI,
String predicate,
Object obj)
- Create a simple Context Subscriber that will listen to the events
matching what is specified in the constructor.
- Parameters:
context
- The universAAL module context.subjTypeURI
- The type URI that the event subject must have. Null for any.predicate
- The exact predicate that the event must equal. Null for any.obj
- The exact instance that the event object must equal. Null for
any.
Copyright © 2014 universAAL Consortium. All Rights Reserved.