Spring BlazeDS Integration

org.springframework.flex.core
Interface ExceptionTranslator

All Known Implementing Classes:
SecurityExceptionTranslator

public interface ExceptionTranslator

Strategy interface that allows for translation of known exception types into BlazeDS MessageExceptions that will propagate proper AMF error message back to the client.

Implementations are encouraged to set the code of the created MessageException to something more useful than the generic "Server.Processing" so that the client may reason on the code for custom fault handling logic.

Author:
Jeremy Grelle

Method Summary
 boolean handles(Class<?> clazz)
          Checks if the translator can handle the specified exception class
 MessageException translate(Throwable t)
          Translate the specified exception into an appropriate MessageException
 

Method Detail

handles

boolean handles(Class<?> clazz)
Checks if the translator can handle the specified exception class

Parameters:
clazz - the class of the exception
Returns:
true if the exception type can be handled

translate

MessageException translate(Throwable t)
Translate the specified exception into an appropriate MessageException

Parameters:
t - the original exception
Returns:
the translated exception

Spring BlazeDS Integration

Copyright © 2011. All Rights Reserved.