Class RouteRequestEvent
java.lang.Object
de.craftsblock.craftscore.event.Event
de.craftsblock.craftscore.event.CancellableEvent
de.craftsblock.craftsnet.events.EventWithCancelReason
de.craftsblock.craftsnet.events.requests.routes.RouteRequestEvent
- All Implemented Interfaces:
de.craftsblock.craftscore.event.Cancellable,GenericRequestEventBase
The
RouteRequestEvent class represents an event related to a route request.
This class provides information about the Exchange and the RouteRegistry.EndpointMapping
involved in the request event.- Since:
- 1.0.0-SNAPSHOT
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull ExchangeGets theExchangewhich stores the involved request, response and some other data.Get a list ofRouteRegistry.EndpointMappingassociated with the request event.booleanChecks if the request event has at least one validRouteRegistry.EndpointMappingassociated with it.Methods inherited from class de.craftsblock.craftsnet.events.EventWithCancelReason
getCancelReason, hasCancelReason, setCancelReasonMethods inherited from class de.craftsblock.craftscore.event.CancellableEvent
isCancelled, setCancelledMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.craftsblock.craftsnet.events.requests.GenericRequestEventBase
getRequest, getResponse
-
Constructor Details
-
RouteRequestEvent
- Parameters:
exchange- TheExchangeobject representing the request and its associated data.
-
-
Method Details
-
getExchange
Gets theExchangewhich stores the involved request, response and some other data.- Specified by:
getExchangein interfaceGenericRequestEventBase- Returns:
- The
Exchange.
-
getMappings
Get a list ofRouteRegistry.EndpointMappingassociated with the request event.- Returns:
- A list of
RouteRegistry.EndpointMappingrepresenting the mappings for the request route.
-
hasMappings
public boolean hasMappings()Checks if the request event has at least one validRouteRegistry.EndpointMappingassociated with it.- Returns:
- true if the event has at least one valid
RouteRegistry.EndpointMapping, false otherwise.
-