Class WriteExec<V>

  • Type Parameters:
    V - The type of value to write.
    All Implemented Interfaces:
    Executable

    public class WriteExec<V>
    extends Processor
    implements Executable
    Implements an asynchronous read method.
    • Constructor Summary

      Constructors 
      Constructor Description
      WriteExec​(java.lang.String functionalProfileName, java.lang.String dataPointName, WriteFunction<V> writeFunction)
      Constructs a new instance.
      WriteExec​(java.lang.String functionalProfileName, java.lang.String dataPointName, WriteFunction<V> writeFunction, io.reactivex.rxjava3.core.Scheduler scheduler)
      Constructs a new instance with a custom scheduler.
    • Constructor Detail

      • WriteExec

        public WriteExec​(java.lang.String functionalProfileName,
                         java.lang.String dataPointName,
                         WriteFunction<V> writeFunction)
        Constructs a new instance.
        Parameters:
        functionalProfileName - the functional profile name
        dataPointName - the data point name
        writeFunction - a reference to the actual method to be called
      • WriteExec

        public WriteExec​(java.lang.String functionalProfileName,
                         java.lang.String dataPointName,
                         WriteFunction<V> writeFunction,
                         io.reactivex.rxjava3.core.Scheduler scheduler)
        Constructs a new instance with a custom scheduler.
        Parameters:
        functionalProfileName - the functional profile name
        dataPointName - the data point name
        writeFunction - a reference to the actual method to be called
        scheduler - a task scheduler
    • Method Detail

      • process

        public void process​(ProcessingType processingType)
        Description copied from class: Processor
        Executes the processes.
        Specified by:
        process in class Processor
        Parameters:
        processingType - the type of execution
      • setWriteValue

        public void setWriteValue​(V value)
        Sets the value to write.
        Parameters:
        value - a value
      • getExecThrowable

        public java.lang.Throwable getExecThrowable()
        Gets the exception that was thrown.
        Returns:
        an instance of Throwable
      • getRequestTime

        public java.time.Instant getRequestTime()
        Gets the time stamp of sending the request.
        Returns:
        an instance of Instant
      • getResponseTime

        public java.time.Instant getResponseTime()
        Gets the time stamp of receiving the response.
        Returns:
        an instance of Instant
      • cleanup

        public void cleanup()
        Cleans up disposable resources.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • setFinishedNotificationReceiver

        public void setFinishedNotificationReceiver​(java.lang.Object notificationReceiver)
        Description copied from interface: Executable
        Sets an object which should receive notifications of status changes.
        Specified by:
        setFinishedNotificationReceiver in interface Executable
        Parameters:
        notificationReceiver - the receiving object