Klasse OperationFailurePublisher

java.lang.Object
de.delinkedde.areashopreborn.application.OperationFailurePublisher

public final class OperationFailurePublisher extends Object
Normalizes asynchronous failures and publishes their safe representation on the Paper thread.
  • Konstruktordetails

    • OperationFailurePublisher

      public OperationFailurePublisher(ThreadBridge threads, OperationalModeService modes)
      Creates the publisher.
      Parameter:
      threads - server-thread bridge
      modes - runtime mutation gate
    • OperationFailurePublisher

      public OperationFailurePublisher(ThreadBridge threads, OperationalModeService modes, EventPublisher events)
      Creates a normalized failure publisher with an explicit platform event boundary.
      Parameter:
      threads - Paper thread bridge
      modes - operating mode controller
      events - synchronous platform event publisher
  • Methodendetails

    • observe

      public <T> CompletableFuture<T> observe(CompletableFuture<T> future, UUID actorId, String operation, String target, OperationCause cause)
      Observes a future without changing its result or exceptional completion.
      Typparameter:
      T - operation result type
      Parameter:
      future - observed operation
      actorId - initiating player, or null
      operation - stable operation name
      target - optional lookup target
      cause - initiating subsystem
      Gibt zurück:
      the original future
    • publishNow

      public void publishNow(UUID actorId, String operation, String target, OperationCause cause, Throwable failure)
      Publishes a failure immediately and must be called on Paper's server thread.
      Parameter:
      actorId - initiating player, or null
      operation - stable operation name
      target - optional lookup target
      cause - initiating subsystem
      failure - original failure