Package org.openremote.manager.event
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 -
Method Summary
Modifier and TypeMethodDescriptiondefault StringgetName()default intGets 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.booleanintercept(jakarta.persistence.EntityManager em, org.openremote.model.attribute.AttributeEvent event)
-
Field Details
-
DEFAULT_PRIORITY
static final int DEFAULT_PRIORITY- See Also:
-
-
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
-
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- TheAttributeEventenriched withAssetandAttributedata.- Returns:
trueif interceptor has handled event and subsequent interceptors should be skipped.- Throws:
AssetProcessingException- When processing failed and the update can not continue.
-