com.rhi.architecture.parc
Class ExceptionHandler

java.lang.Object
  extended bycom.rhi.architecture.parc.ExceptionHandler

public class ExceptionHandler
extends java.lang.Object

The handler class is designed for critical failures during filter processing. Since Filters are executed w/in one or more threads, they cannot propagate errors up the call stack to the main thread. To remedy this problem, the ExceptionHandler is made available to Filters to report critical FATAL processing errors. It is shared by all the threads (including the main thread running the pipeline) and is checked @ the end of each cycle so that application shutdown can happen cleanly as soon as possible. This is a common pattern for error reporting in a multi- threaded environment.

Since:
1.0
Author:
Pete McKinstry

Constructor Summary
ExceptionHandler()
          Default constructor
 
Method Summary
 boolean hasError()
          True/False flag allowing the pipeline components to recognize when a fatal error has been reported.
 void reportException(ProcessingException e)
          Method used by Filters to report a fatal error.
 void rethrowException()
          Rethrow the first reported exception.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExceptionHandler

public ExceptionHandler()
Default constructor

Since:
1.0
Method Detail

reportException

public void reportException(ProcessingException e)
Method used by Filters to report a fatal error.

Parameters:
e -
Since:
1.0

rethrowException

public void rethrowException()
                      throws ProcessingException
Rethrow the first reported exception.

Throws:
ProcessingException
Since:
1.0

hasError

public boolean hasError()
True/False flag allowing the pipeline components to recognize when a fatal error has been reported.

Returns:
boolean
Since:
1.0


Copyright © 2002-2004 Robert Half International. All Rights Reserved.