Interface IPVListener

All Known Implementing Classes:
FormulaData

public interface IPVListener
A listener on all events of the PV.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Will be called when connection state changed.
    default void
    If no ExceptionHandler was given to the PV, this method will be called when exception happened.
    default void
    Will be called when PV value changed.
    default void
    writeFinished(IPV pv, boolean isWriteSucceeded)
    Will be called when a write is finished.
    default void
    Will be called when write permission may have changed.
  • Method Details

    • connectionChanged

      default void connectionChanged(IPV pv)
      Will be called when connection state changed. It the connection is closed by explicitly calling IPV.stop(), this method will not be notified.
      Parameters:
      pv - the pv whose connection state changed.
    • exceptionOccurred

      default void exceptionOccurred(IPV pv, Exception exception)
      If no ExceptionHandler was given to the PV, this method will be called when exception happened. Otherwise, the exception will be handled by the ExceptionHandler.
      Parameters:
      pv - the pv which has read related exception happened.
      exception - the exception that has been caught.
    • valueChanged

      default void valueChanged(IPV pv)
      Will be called when PV value changed.
      Parameters:
      pv - the pv whose value has changed.
    • writeFinished

      default void writeFinished(IPV pv, boolean isWriteSucceeded)
      Will be called when a write is finished.
      Note: when this is called, the value of the pv may not update yet, which depends the max update rate, so it is not recommended to call IPV.getValue() in this method.
      Parameters:
      pv - the pv on which the write event happened.
      isWriteSucceeded - true if the write was successful.
    • writePermissionChanged

      default void writePermissionChanged(IPV pv)
      Will be called when write permission may have changed. The write permission can be get from IPV.isWriteAllowed()
      Parameters:
      pv - the pv whose permission may have changed.