Class Provider

  • All Implemented Interfaces:
    com.google.common.util.concurrent.Service

    
    public class Provider
    extends AbstractIdleService
                        

    This 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.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
      Provider(ProviderUtil providerUtil) Create an instance of an SDC Provider.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      void setLocation(LocationDetail location)
      void changeWaveform(String handle) Adds a sine wave to the data of a waveform.
      void changeNumericMetric(String handle) Increments the value of a NumericMetricState.
      void changeStringMetric(String handle) Changes the content of a StringMetricState, toggling between "UPPERCASE" and "lowercase" as content.
      void changeEnumStringMetric(String handle) Changes the content of an EnumStringMetricState, selecting the next allowed value.
      void changeAlertSignalAndConditionPresence(String signalHandle, String conditionHandle) Toggles an AlertSignalState and AlertConditionState between presence on and off.
      static void main(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 toggle
        conditionHandle - matching condition to toggle