org.sape.carbon.core.exception
Class ExceptionDelegateFactory

java.lang.Object
  |
  +--org.sape.carbon.core.exception.ExceptionDelegateFactory

public class ExceptionDelegateFactory
extends Object

This is the Carbon Factory for building new exception delegates for use in Carbon based exceptions. This allows for the configuration of a new Exception Delegate on a system-wide basis, or the default use of the standard DefaultExceptionDelegateImpl delegate.

Copyright 2002 Sapient

Since:
carbon 1.0
Version:
$Revision: 1.12 $($Author: dvoet $ / $Date: 2003/05/05 21:21:21 $)
Author:
Greg Hinkle, April 2002

Field Summary
private static String DELEGATE_PROPERTY
          The system property string which can contain the fully-qualified class name of the class to be used as the system's standard exception delegate.
private static ExceptionDelegateFactory INSTANCE
          References the single valid instance of this singleton
private  org.apache.commons.logging.Log log
          The handle to Apache-commons logger
 
Constructor Summary
private ExceptionDelegateFactory()
          This is a singleton so we have a private constructor to prevent impropper instantiation.
 
Method Summary
 ExceptionDelegate createDelegate(Class exceptionSource, SeverityEnum severity, Throwable delegatee, String message, Throwable cause)
          Creates an exception delegate.
static ExceptionDelegateFactory getInstance()
           Static factory method for getting a reference to the ExceptionDelegateFactory.
protected  ExceptionDelegate newDelegate()
          Creates a new empty exception delegate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private org.apache.commons.logging.Log log
The handle to Apache-commons logger


DELEGATE_PROPERTY

private static final String DELEGATE_PROPERTY
The system property string which can contain the fully-qualified class name of the class to be used as the system's standard exception delegate.

See Also:
Constant Field Values

INSTANCE

private static final ExceptionDelegateFactory INSTANCE
References the single valid instance of this singleton

Constructor Detail

ExceptionDelegateFactory

private ExceptionDelegateFactory()

This is a singleton so we have a private constructor to prevent impropper instantiation.

Method Detail

createDelegate

public ExceptionDelegate createDelegate(Class exceptionSource,
                                        SeverityEnum severity,
                                        Throwable delegatee,
                                        String message,
                                        Throwable cause)
Creates an exception delegate.

Parameters:
exceptionSource - the exception source being delegated
severity - the severity of the exception
delegatee - the delegatee
message - the error message of the exception
cause - a cause of the exception
Returns:
the new delegate

newDelegate

protected ExceptionDelegate newDelegate()
Creates a new empty exception delegate.

Returns:
the new delegate

getInstance

public static ExceptionDelegateFactory getInstance()

Static factory method for getting a reference to the ExceptionDelegateFactory.

Returns:
ExceptionDelegateFactory


Copyright 1999-2003 Sapient Corporation. All Rights Reserved.