|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.universAAL.middleware.bus.member.BusMember
org.universAAL.middleware.bus.member.Publisher
org.universAAL.middleware.context.ContextPublisher
org.universAAL.middleware.context.DefaultContextPublisher
org.universAAL.support.utils.context.mid.UtilPublisher
public class UtilPublisher
Class that can be used to easily create a Context Publisher that can be used in almost all situations. This simple Publisher extends the DefaultContextPublisher included in the MW, 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.
Example: A publisher that gives events about status of a Heater Actuator.
publisher = new UtilPublisher(context, DEVICE_INSTANCE_URI,
ContextProviderType.controller,
new HeaterActuator(DEVICE_INSTANCE_URI),
HeaterActuator.PROP_STATUS,
TypeMapper.getDatatypeURI(Boolean.class));
Field Summary |
---|
Fields inherited from class org.universAAL.middleware.bus.member.BusMember |
---|
busResourceURI, owner, theBus |
Constructor Summary | |
---|---|
UtilPublisher(ModuleContext context,
String uri)
Create a simple gauge Context Publisher which provided events can be of any type and is identified with the given URI. |
|
UtilPublisher(ModuleContext context,
String uri,
ContextProviderType type)
Create a simple Context Publisher of the given type which provided events can be of any type and is identified with the given URI. |
|
UtilPublisher(ModuleContext context,
String uri,
ContextProviderType type,
ContextEventPattern[] pattern)
Create a simple Context Publisher of the given type which provided events are described by a pattern and is identified with the given URI. |
|
UtilPublisher(ModuleContext context,
String uri,
ContextProviderType type,
ManagedIndividual sub,
String predicate,
String objTypeURI)
Create a simple Context Publisher of the given type which provided events are described by the arguments and is identified with the given URI. |
|
UtilPublisher(ModuleContext context,
String uri,
ContextProviderType type,
String subjTypeURI,
String predicate,
String objTypeURI)
Create a simple Context Publisher of the given type which provided events are described by the arguments and is identified with the given URI. |
Method Summary |
---|
Methods inherited from class org.universAAL.middleware.context.DefaultContextPublisher |
---|
communicationChannelBroken |
Methods inherited from class org.universAAL.middleware.context.ContextPublisher |
---|
busDyingOut, getMyID, publish |
Methods inherited from class org.universAAL.middleware.bus.member.BusMember |
---|
close, getType, getURI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UtilPublisher(ModuleContext context, String uri)
context
- The universAAL module context.uri
- The URI that identifies the Context Provider.public UtilPublisher(ModuleContext context, String uri, ContextProviderType type)
context
- The universAAL module context.uri
- The URI that identifies the Context Provider.type
- The type of Context Provider, one of Gauge, Controller or
Reasoner.public UtilPublisher(ModuleContext context, String uri, ContextProviderType type, ContextEventPattern[] pattern)
context
- The universAAL module context.uri
- The URI that identifies the Context Provider.type
- The type of Context Provider, one of Gauge, Controller or
Reasoner.pattern
- Array of Patterns describing the provided events, as normally
used in the native API.public UtilPublisher(ModuleContext context, String uri, ContextProviderType type, String subjTypeURI, String predicate, String objTypeURI)
context
- The universAAL module context.uri
- The URI that identifies the Context Provider.type
- The type of Context Provider, one of Gauge, Controller or
Reasoner.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.public UtilPublisher(ModuleContext context, String uri, ContextProviderType type, ManagedIndividual sub, String predicate, String objTypeURI)
context
- The universAAL module context.uri
- The URI that identifies the Context Provider.type
- The type of Context Provider, one of Gauge, Controller or
Reasoner.sub
- 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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |