Class ServiceException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.apache.avalon.framework.CascadingException
-
- org.apache.avalon.framework.service.ServiceException
-
- All Implemented Interfaces:
java.io.Serializable,CascadingThrowable
public class ServiceException extends CascadingException
The exception thrown to indicate a problem with service. It is usually thrown by ServiceManager or ServiceSelector.- Version:
- $Id: ServiceException.java 30977 2004-07-30 03:57:54 -0500 (Fri, 30 Jul 2004) niclas $
- Author:
- Avalon Development Team
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Stringm_key
-
Constructor Summary
Constructors Constructor Description ServiceException(java.lang.String message)Deprecated.use the String,String version insteadServiceException(java.lang.String key, java.lang.String message)Construct a newServiceExceptioninstance.ServiceException(java.lang.String key, java.lang.String message, java.lang.Throwable throwable)Construct a newServiceExceptioninstance.ServiceException(java.lang.String message, java.lang.Throwable throwable)Deprecated.use the String,String,Throwable version instead
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.StringgetKey()Return the key that caused the exception.java.lang.StringgetMessage()Override super's message to add role if applicable.java.lang.StringgetRole()Deprecated.Use getKey() instead-
Methods inherited from class org.apache.avalon.framework.CascadingException
getCause
-
-
-
-
Constructor Detail
-
ServiceException
public ServiceException(java.lang.String message, java.lang.Throwable throwable)Deprecated.use the String,String,Throwable version insteadConstruct a newServiceExceptioninstance.- Parameters:
message- the exception messagethrowable- the throwable
-
ServiceException
public ServiceException(java.lang.String key, java.lang.String message, java.lang.Throwable throwable)Construct a newServiceExceptioninstance.- Parameters:
key- the lookup keymessage- the exception messagethrowable- the throwable
-
ServiceException
public ServiceException(java.lang.String message)
Deprecated.use the String,String version insteadConstruct a newServiceExceptioninstance.- Parameters:
message- the exception message
-
ServiceException
public ServiceException(java.lang.String key, java.lang.String message)Construct a newServiceExceptioninstance.- Parameters:
key- the lookup keymessage- the exception message
-
-
Method Detail
-
getKey
public java.lang.String getKey()
Return the key that caused the exception.- Returns:
- the lookup key triggering the exception
-
getRole
public java.lang.String getRole()
Deprecated.Use getKey() insteadReturn the role that caused the exception- Returns:
- the the lookup key triggering the exception
-
getMessage
public java.lang.String getMessage()
Override super's message to add role if applicable.- Overrides:
getMessagein classjava.lang.Throwable- Returns:
- a message.
-
-