Class NoOpInvocationEventEmitter

java.lang.Object
com.fayupable.logged.core.port.NoOpInvocationEventEmitter
All Implemented Interfaces:
InvocationEventEmitter

public final class NoOpInvocationEventEmitter extends Object implements InvocationEventEmitter
A no-op InvocationEventEmitter that discards every event it receives.

This implementation exists so that the core module remains fully usable on its own, without requiring any adapter (for example logged-spring) on the classpath. Adapter modules are expected to register their own InvocationEventEmitter implementation and override this default; this class is the fallback when none is provided.

  • Constructor Details

    • NoOpInvocationEventEmitter

      public NoOpInvocationEventEmitter()
  • Method Details

    • emit

      public void emit(MethodInvocationEvent event)
      Description copied from interface: InvocationEventEmitter
      Publishes the given invocation event to whatever sink this implementation targets.

      Implementations must not throw checked or unchecked exceptions that would propagate back into the intercepted method call. Emission failures (for example a logging backend being unavailable) should be handled internally by the implementation.

      Specified by:
      emit in interface InvocationEventEmitter
      Parameters:
      event - the invocation event to publish, never null