Class AbstractEventSourceInterceptor

java.lang.Object
io.micronaut.coherence.data.interceptors.AbstractEventSourceInterceptor
All Implemented Interfaces:
io.micronaut.aop.Interceptor, io.micronaut.aop.MethodInterceptor, io.micronaut.core.order.Ordered
Direct Known Subclasses:
AbstractAsyncEventSourceInterceptor, PersistEventSourceInterceptor, RemoveEventSourceInterceptor, UpdateEventSourceInterceptor

public abstract class AbstractEventSourceInterceptor extends Object implements io.micronaut.aop.MethodInterceptor
Base class for sync event source interceptors.
  • Field Details

    • registry

      protected final io.micronaut.data.model.runtime.RuntimeEntityRegistry registry
      RuntimeEntityRegistry used for event notification.
  • Constructor Details

    • AbstractEventSourceInterceptor

      protected AbstractEventSourceInterceptor(io.micronaut.data.model.runtime.RuntimeEntityRegistry registry)
      Constructs a new AbstractEventSourceInterceptor.
      Parameters:
      registry - the RuntimeEntityRegistry
  • Method Details

    • intercept

      public Object intercept(io.micronaut.aop.MethodInvocationContext context)
      Specified by:
      intercept in interface io.micronaut.aop.MethodInterceptor
    • getEventGroup

      public abstract AbstractEventSourceInterceptor.EventGroup getEventGroup()
      Return the EventGroup handled by this interceptor.
      Returns:
      the EventGroup handled by this interceptor
    • getHandledPreEventType

      public abstract AbstractEventSourceInterceptor.EventType getHandledPreEventType()
      Return the PRE event type this interceptor wishes to emit.
      Returns:
      the PRE event type this interceptor wishes to emit
    • getHandledPostEventType

      public abstract AbstractEventSourceInterceptor.EventType getHandledPostEventType()
      Return the POST event type this interceptor wishes to emit.
      Returns:
      the POST event type this interceptor wishes to emit
    • trigger

      protected boolean trigger(AbstractEventSourceInterceptor.EventType eventType, Object entity)
      Trigger the specified event using the provided entity as the event value.
      Parameters:
      eventType - the AbstractEventSourceInterceptor.EventType
      entity - the event value
      Returns:
      the result of any PRE events may be inspected to stop processing of an event. Any values returned for POST events is meaningless.