Package com.chillycheesy.modulo.event
Class RequestEvent
java.lang.Object
com.chillycheesy.modulo.events.Event
com.chillycheesy.modulo.event.RequestEvent
- All Implemented Interfaces:
Cancelable
- Direct Known Subclasses:
DeleteRequestEvent
,GetRequestEvent
,PostRequestEvent
,PutRequestEvent
This event was wen a http request was emit.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CancelableAction
protected boolean
protected javax.servlet.http.HttpServletRequest
The request that was made.protected javax.servlet.http.HttpServletResponse
The response that was made. -
Constructor Summary
ConstructorsConstructorDescriptionRequestEvent(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Creates a new RequestEvent. -
Method Summary
Modifier and TypeMethodDescriptionGetter for the cancelable action.javax.servlet.http.HttpServletRequest
Gets the request that was made.javax.servlet.http.HttpServletResponse
Gets the response that was made.boolean
Check if the event was cancel.setCancelableAction(CancelableAction action)
Setter for the cancelable action.void
setCanceled(boolean cancel)
Setter for the cancel status.void
setRequest(javax.servlet.http.HttpServletRequest request)
Sets the request that was made.void
setResponse(javax.servlet.http.HttpServletResponse response)
Sets the response that was made.Methods inherited from class com.chillycheesy.modulo.events.Event
getEmitter, setEmitter
-
Field Details
-
request
protected javax.servlet.http.HttpServletRequest requestThe request that was made. -
response
protected javax.servlet.http.HttpServletResponse responseThe response that was made. -
isCanceled
protected boolean isCanceled -
cancelableAction
-
-
Constructor Details
-
RequestEvent
public RequestEvent(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Creates a new RequestEvent.- Parameters:
request
- The request that was made.response
- The response that was made.
-
-
Method Details
-
getRequest
public javax.servlet.http.HttpServletRequest getRequest()Gets the request that was made.- Returns:
- The request that was made.
-
getResponse
public javax.servlet.http.HttpServletResponse getResponse()Gets the response that was made.- Returns:
- The response that was made.
-
setRequest
public void setRequest(javax.servlet.http.HttpServletRequest request)Sets the request that was made.- Parameters:
request
- The request that was made.
-
setResponse
public void setResponse(javax.servlet.http.HttpServletResponse response)Sets the response that was made.- Parameters:
response
- The response that was made.
-
isCanceled
public boolean isCanceled()Description copied from interface:Cancelable
Check if the event was cancel.- Specified by:
isCanceled
in interfaceCancelable
- Returns:
- The cancel status.
-
setCanceled
public void setCanceled(boolean cancel)Description copied from interface:Cancelable
Setter for the cancel status.- Specified by:
setCanceled
in interfaceCancelable
- Parameters:
cancel
- The new cancel status.
-
setCancelableAction
Description copied from interface:Cancelable
Setter for the cancelable action.- Specified by:
setCancelableAction
in interfaceCancelable
- Parameters:
action
- The action to execute.
-
getCancelableAction
Description copied from interface:Cancelable
Getter for the cancelable action.- Specified by:
getCancelableAction
in interfaceCancelable
- Returns:
- The action to execute.
-