Interface AttributeEventInterceptor


public interface AttributeEventInterceptor
An interceptor that can choose to intercept the AttributeEvent passing through the system; if it is handled by this interceptor then the event will not be passed to any more interceptors and will not reach the DB.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
  • Method Summary

    Modifier and Type
    Method
    Description
    default String
     
    default int
    Gets the priority of this interceptor which is used to determine the order in which the interceptors are called; interceptors with a lower priority are called first.
    boolean
    intercept(jakarta.persistence.EntityManager em, org.openremote.model.attribute.AttributeEvent event)
     
  • Field Details

  • Method Details

    • getPriority

      default int getPriority()
      Gets the priority of this interceptor which is used to determine the order in which the interceptors are called; interceptors with a lower priority are called first.
    • getName

      default String getName()
    • intercept

      boolean intercept(jakarta.persistence.EntityManager em, org.openremote.model.attribute.AttributeEvent event) throws AssetProcessingException
      Parameters:
      em - The current session and transaction on the database, processors may use this to query additional data.
      event - The AttributeEvent enriched with Asset and Attribute data.
      Returns:
      true if interceptor has handled event and subsequent interceptors should be skipped.
      Throws:
      AssetProcessingException - When processing failed and the update can not continue.