public abstract class CommunicationGateway extends Object
component integrators
possible to gain access
to related external datapoints
.
For a better understanding, please refer to both the package documentation
and the documentation of the methods further below.Constructor and Description |
---|
CommunicationGateway() |
Modifier and Type | Method and Description |
---|---|
abstract Object |
readValue(ExternalDatapoint datapoint)
component integrators can use this method to
get the value of a given property of a given external component by
specifying the related external datapoint. |
abstract void |
register(String componentTypeURI,
ComponentIntegrator integrator)
To be used by
component integrators to
register to this gateway for external components of the given type. |
abstract int |
startEventing(ComponentIntegrator integrator,
ExternalComponent component,
byte intervalSeconds)
Serves as means for subscribing for events related to the changes of the
value of any property of the given external component.
|
abstract int |
startEventing(ComponentIntegrator integrator,
ExternalDatapoint datapoint,
byte intervalSeconds)
Serves as means for subscribing for events related to the changes of the
value of a given property of a given external component by specifying the
related external datapoint.
|
abstract int |
startEventing(ComponentIntegrator integrator,
String componentTypeURI,
String propURI,
byte intervalSeconds)
If the given property URI is not null, serves as means for subscribing
for events related to the changes of the value of the given property of
any external component of the given type; otherwise, with propURI ==
null, it can be used to subscribe for the changes of the value of any
property of any external component of the given type.
|
abstract void |
stopEventing(int eventingID)
component integrators can use this method to
unsubscribe a subscription done previously. |
abstract void |
writeValue(ExternalDatapoint datapoint,
Object value)
component integrators can use this method to
change the value of a given property of a given external component by
specifying the related external datapoint and the new value. |
public abstract void register(String componentTypeURI, ComponentIntegrator integrator)
component integrators
to
register to this gateway for external components of the given type. The
implementation must (1) add the given integrator to the list of
integrators interested in the given type of components, and (2) call
the
related notification method
of the integrator with the list of
components of the given type, both for those already known at the time of
registration and at any time in future when new components of the same
type are added to the external network.public abstract int startEventing(ComponentIntegrator integrator, ExternalDatapoint datapoint, byte intervalSeconds)
Serves as means for subscribing for events related to the changes of the value of a given property of a given external component by specifying the related external datapoint. Note that this implies that the external components made known by gateways to integrators must include the property mapping to datapoints.
To be used by component integrators
to inform
this gateway about the interest to be notified as soon as the value of
the given external datapoint changes. The implementation must (1) add the
given integrator to the list of integrators interested in the same kind
of events, and (2) call
the
related notification method
of the integrator both with the current
value at the time of registration and at any time in future when the
value changes.
integrator
- the integrator registing for notification.datapoint
- the datapoint whose changes of values must fire events.intervalSeconds
- needed when the external communication protocol doesn't
support "real-time" eventing and hence the gateway has to
implement the eventing mechanism by pulling the value every n
seconds and check if it has changed or not. In that case, this
parameter indicates the related preference of the integrator.public abstract int startEventing(ComponentIntegrator integrator, ExternalComponent component, byte intervalSeconds)
startEventing(ComponentIntegrator, ExternalDatapoint, byte)
, it
wildcards all datapoints within the scope of the given external
component.public abstract int startEventing(ComponentIntegrator integrator, String componentTypeURI, String propURI, byte intervalSeconds)
startEventing(ComponentIntegrator, ExternalDatapoint, byte)
, it
wildcards all datapoints within the scope of all external components of
the given type, either by selecting those that correspond to a given
property or not.public abstract void stopEventing(int eventingID)
component integrators
can use this method to
unsubscribe a subscription done previously.eventingID
- the ID returned previously when calling
startEventing( ComponentIntegrator, ExternalDatapoint, byte)
or any of the wildcarding versions of it.public abstract Object readValue(ExternalDatapoint datapoint)
component integrators
can use this method to
get the value of a given property of a given external component by
specifying the related external datapoint. Note that this implies that
the external components made known by gateways to integrators must
include the property mapping to datapoints.public abstract void writeValue(ExternalDatapoint datapoint, Object value)
component integrators
can use this method to
change the value of a given property of a given external component by
specifying the related external datapoint and the new value. Note that
this implies that the external components made known by gateways to
integrators must include the property mapping to datapoints.Copyright © 2018 universAAL Consortium. All rights reserved.