|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.util.errorhandlers.CompositeErrorHandler
public class CompositeErrorHandler
CompositeErrorHandler is a composite errorhandler. It is used to send error messages to two errorhandlers so that both can handle the error. An example of this is if an error should be put up in a messageBox and written to a log as well. To send error messages to more errorhandlers, use multiple CompositeErrorHandler objects:
ErrorHandlerInterface fgh = new CompositeErrorHandler(f, new CompositeErrorHandler(g, h)); ErrorHandlerInterface fghi = new CompositeErrorHandler(new CompositeErrorHandler(f, g), new CompositeErrorHandler(h, i));
Constructor Summary | |
---|---|
CompositeErrorHandler(ErrorHandlerInterface firstErrorHandler,
ErrorHandlerInterface secondErrorHandler)
Default Constructor. |
Method Summary | |
---|---|
ErrorHandlerInterface |
getFirst()
Get the first errorhandler called in handleError. |
ErrorHandlerInterface |
getSecond()
Get the second errorhandler called in handleError. |
void |
handleError(com.sas.ComponentInterface component,
com.sas.text.Message message,
java.lang.String messageCode)
Calls handleError on the first and then the second errorhandler. |
void |
setFirst(ErrorHandlerInterface firstErrorHandler)
Set the first errorhandler called in handleError. |
void |
setSecond(ErrorHandlerInterface secondErrorHandler)
Set the second errorhandler called in handleError. |
Constructor Detail |
---|
public CompositeErrorHandler(ErrorHandlerInterface firstErrorHandler, ErrorHandlerInterface secondErrorHandler)
Method Detail |
---|
public ErrorHandlerInterface getFirst()
public void setFirst(ErrorHandlerInterface firstErrorHandler)
firstErrorHandler
- the first errorhandler called in handleError.public ErrorHandlerInterface getSecond()
public void setSecond(ErrorHandlerInterface secondErrorHandler)
secondErrorHandler
- the second errorhandler called in handleError.public void handleError(com.sas.ComponentInterface component, com.sas.text.Message message, java.lang.String messageCode)
handleError
in interface ErrorHandlerInterface
component
- The component on which the error occured.message
- A Message object with formatted with the message to display.
The object should also contain the necessary arguments for
formatting the message.messageCode
- A non-translatable string which indicates the type of error that occured.
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |