Package ch.tocco.nice2.netui.impl.dwr
Class ObjectOutdatedExceptionHandler
java.lang.Object
ch.tocco.nice2.netui.impl.dwr.ObjectOutdatedExceptionHandler
- All Implemented Interfaces:
ExceptionHandler
This handler transforms an
ObjectOutdatedException
into an
ObjectOutdatedExceptionHandler.ObjectOutdatedInformationException
which is sent to the client.
The OutdatedObjectInfo
object is wrapped in a ObjectOutdatedExceptionHandler.ObjectOutdatedInformation
to have a type attribute available in the client (ObjectOutdatedExceptionHandler.ObjectOutdatedInformation.getType()
).-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
ObjectOutdatedExceptionHandler
public ObjectOutdatedExceptionHandler()
-
-
Method Details
-
handle
Description copied from interface:ExceptionHandler
This method will be called for all causes that may occur on the server and can be handled by this handler. A handler may log certain exceptions or create a new / wrapped / alternative cause to be passed to the client.
Keep in mind that not all Exceptions are sent to the client as is but may be wrapped by the system default as well. See ExceptionTranslationAndLoggingAjaxFilter#setClientExceptions to declare an Exception to be passed all the way to the client (and prevent further wrapping).- Specified by:
handle
in interfaceExceptionHandler
- Parameters:
cause
- the cause to be handled- Returns:
- a new / wrapped / alternative cause to be passed to the client
-
canHandle
- Specified by:
canHandle
in interfaceExceptionHandler
- Parameters:
cause
- the cause to be handled- Returns:
- true if this handler can handle this cause
-