Interface PollingOutput


  • public interface PollingOutput
    Output parameter provided to the poll method of an PollingProtocolAdapter.

    It can be used to

    • Add data points
    • Finish the polling
    • Failing the polling
    • Method Detail

      • addDataPoint

        void addDataPoint​(@NotNull
                          @NotNull String tagName,
                          @NotNull
                          @NotNull Object tagValue)
        Adds a data point to this sample.
        Parameters:
        tagName - the name for the tag of this data point
        tagValue - the value of this data point
      • addDataPoint

        void addDataPoint​(@NotNull
                          @NotNull DataPoint dataPoint)
        Adds the given data point to this sample.
        Parameters:
        dataPoint - the data point to add.
      • finish

        void finish()
        Signals Edge that all data points are added and the further processing is done. If no data points were added until this point, no publish will be created.
      • fail

        void fail​(@NotNull
                  @NotNull Throwable t,
                  @Nullable
                  @Nullable String errorMessage)
        Signals that something went wrong during polling. As a result no publish is created from data. Data added before calling fail() will not be processed further.
        Parameters:
        t - Throwable indicating what went wrong.
        errorMessage - an optional error message delivering further insights.
      • fail

        void fail​(@NotNull
                  @NotNull String errorMessage)
        Signals that something went wrong during polling. As a result no publish is created from data. Data added before calling fail() will not be processed further.
        Parameters:
        errorMessage - a message indicating what went wrong.