Class PostRequestEvent
java.lang.Object
de.craftsblock.craftscore.event.Event
de.craftsblock.craftsnet.events.requests.PostRequestEvent
- All Implemented Interfaces:
GenericRequestEventBase
public class PostRequestEvent
extends de.craftsblock.craftscore.event.Event
implements GenericRequestEventBase
This event is triggered after an HTTP request has been processed.
It contains information about the request, whether the requested resource was found,
and whether the resource was shared.
- Since:
- 3.1.0-SNAPSHOT
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPostRequestEvent(Exchange exchange, boolean found, boolean shared) Constructs a newPostRequestEvent. -
Method Summary
Methods 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
-
PostRequestEvent
Constructs a newPostRequestEvent.- Parameters:
exchange- TheExchangeobject containing the details of the HTTP request and response.found- A boolean flag indicating whether the requested resource was found.shared- A boolean flag indicating whether the resource was shared successfully.
-
-
Method Details
-
getExchange
Gets theExchangewhich stores the involved request, response and some other data.- Specified by:
getExchangein interfaceGenericRequestEventBase- Returns:
- The
Exchange.
-
wasFound
public boolean wasFound()Checks whether the requested resource was found.- Returns:
trueif the resource was found,falseotherwise.
-