Package com.example.provider1
Class Provider
-
- All Implemented Interfaces:
-
com.google.common.util.concurrent.Service
public class Provider extends AbstractIdleServiceThis is an example provider using an mdib provided as XML as well as TLS secured communication.
It is the complement to com.example.consumer1.Consumer in terms of used functionality and features.
-
-
Constructor Summary
Constructors Constructor Description Provider(ProviderUtil providerUtil)Create an instance of an SDC Provider.
-
Method Summary
Modifier and Type Method Description voidsetLocation(LocationDetail location)voidchangeWaveform(String handle)Adds a sine wave to the data of a waveform. voidchangeNumericMetric(String handle)Increments the value of a NumericMetricState. voidchangeStringMetric(String handle)Changes the content of a StringMetricState, toggling between "UPPERCASE" and "lowercase" as content. voidchangeEnumStringMetric(String handle)Changes the content of an EnumStringMetricState, selecting the next allowed value. voidchangeAlertSignalAndConditionPresence(String signalHandle, String conditionHandle)Toggles an AlertSignalState and AlertConditionState between presence on and off. static voidmain(Array<String> args)-
Methods inherited from class com.google.common.util.concurrent.AbstractIdleService
addListener, awaitRunning, awaitTerminated, failureCause, isRunning, startAsync, state, stopAsync, toString -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
Provider
Provider(ProviderUtil providerUtil)
Create an instance of an SDC Provider.- Parameters:
providerUtil- options and configured injector
-
-
Method Detail
-
setLocation
void setLocation(LocationDetail location)
-
changeWaveform
void changeWaveform(String handle)
Adds a sine wave to the data of a waveform.
- Parameters:
handle- descriptor handle of waveform state
-
changeNumericMetric
void changeNumericMetric(String handle)
Increments the value of a NumericMetricState.
- Parameters:
handle- descriptor handle of metric state
-
changeStringMetric
void changeStringMetric(String handle)
Changes the content of a StringMetricState, toggling between "UPPERCASE" and "lowercase" as content.
- Parameters:
handle- descriptor handle of metric state
-
changeEnumStringMetric
void changeEnumStringMetric(String handle)
Changes the content of an EnumStringMetricState, selecting the next allowed value.
- Parameters:
handle- descriptor handle of metric state
-
changeAlertSignalAndConditionPresence
void changeAlertSignalAndConditionPresence(String signalHandle, String conditionHandle)
Toggles an AlertSignalState and AlertConditionState between presence on and off.
- Parameters:
signalHandle- signal handle to toggleconditionHandle- matching condition to toggle
-
-
-
-