Class 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 registry
      RuntimeEntityRegistry used for event notification.
  • Constructor Details

    • AbstractEventSourceInterceptor

      protected AbstractEventSourceInterceptor( registry)
      Constructs a new AbstractEventSourceInterceptor.
      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.
      the EventGroup handled by this interceptor
    • getHandledPreEventType

      public abstract AbstractEventSourceInterceptor.EventType getHandledPreEventType()
      Return the PRE event type this interceptor wishes to emit.
      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.
      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.
      eventType - the AbstractEventSourceInterceptor.EventType
      entity - the event value
      the result of any PRE events may be inspected to stop processing of an event. Any values returned for POST events is meaningless.