Class PreRequestEvent

java.lang.Object
de.craftsblock.craftscore.event.Event
de.craftsblock.craftscore.event.CancellableEvent
de.craftsblock.craftsnet.events.requests.PreRequestEvent
All Implemented Interfaces:
de.craftsblock.craftscore.event.Cancellable, GenericRequestEventBase

public class PreRequestEvent extends de.craftsblock.craftscore.event.CancellableEvent implements GenericRequestEventBase
This event is triggered before a http request is processed as route or share. It allows for pre-processing of the request, including the ability to cancel it before it is handled. The event holds an Exchange object that contains the details of the request. By extending CancellableEvent, this event can be cancelled, stopping further processing.
Since:
3.1.0-SNAPSHOT
See Also:
  • Constructor Details

    • PreRequestEvent

      public PreRequestEvent(Exchange exchange)
      Constructs a new PreRequestEvent with the provided Exchange object.
      Parameters:
      exchange - the Exchange object containing the HTTP request data.
  • Method Details