Package com.cksource.ckfinder.event
Class ExceptionEvent
java.lang.Object
java.util.EventObject
org.springframework.context.ApplicationEvent
com.cksource.ckfinder.event.Event
com.cksource.ckfinder.event.RequestContextAwareEvent
com.cksource.ckfinder.event.ExceptionEvent
- All Implemented Interfaces:
Serializable
The ExceptionEvent event class.
Event triggered when unhandled exception occurs. Listener for this event
can create a ResponseEntity
used later to build HTTP response.
- See Also:
-
Field Summary
FieldsFields inherited from class com.cksource.ckfinder.event.RequestContextAwareEvent
request, response
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorsConstructorDescriptionExceptionEvent
(Object source, Exception exception, HttpServletRequest request, HttpServletResponse response) Constructs the event. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks if this event has the response entity defined.void
setResponseEntity
(ResponseEntity responseEntity) Sets response entity to build the HTTP response for this exception.Methods inherited from class com.cksource.ckfinder.event.RequestContextAwareEvent
getRequest, getResponse
Methods inherited from class org.springframework.context.ApplicationEvent
getTimestamp
Methods inherited from class java.util.EventObject
getSource, toString
-
Field Details
-
exception
-
responseEntity
-
-
Constructor Details
-
ExceptionEvent
public ExceptionEvent(Object source, Exception exception, HttpServletRequest request, HttpServletResponse response) Constructs the event.- Parameters:
source
- the object on which the event initially occurredexception
- raised exceptionrequest
- current HTTP requestresponse
- current HTTP response
-
-
Method Details
-
getException
- Returns:
- exception which triggered this event
-
getResponseEntity
- Returns:
- response entity to build the HTTP response for this exception
-
setResponseEntity
Sets response entity to build the HTTP response for this exception.- Parameters:
responseEntity
- response entity object
-
hasResponseEntity
public boolean hasResponseEntity()Checks if this event has the response entity defined.- Returns:
- true if this event has the response entity defined
-