|
ABLE 2.0.0 07/02/2003 10:25:01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Throwable | +--java.lang.Exception | +--java.io.IOException | +--java.rmi.RemoteException | +--com.ibm.able.AbleException
The AbleException class defines an from which all other subpackages may extend their own exceptions. Its unique features support:
Able.MSG_INFO
, Able.MSG_WARNING
,
or Able.MSG_ERROR
, or Able.MSG_UNSPECIFIED
.
Field Summary | |
---|---|
protected AbleMessageContainer |
myMessageContainer
Instead of a pre-resolved message text, an exception may contain a message container that carries enough information to resolve a message at a later time, thus enabling "late message binding". |
protected java.lang.Object |
object
The object producing the error. |
protected long |
severity
|
Fields inherited from class java.rmi.RemoteException |
---|
detail |
Constructor Summary | |
---|---|
AbleException()
Construct a new exception of an unspecified severity. |
|
AbleException(AbleMessageContainer theMessageContainer,
java.lang.String theMessage)
Constructs a new exception with the specified locale-specific elements, which can be formatted into a localized message at a later time. |
|
AbleException(AbleMessageContainer theMessageContainer,
java.lang.String theMessage,
java.lang.Throwable theThrowable)
Constructs a new exception with the specified locale-specific elements, which can be formatted into a localized message at a later time. |
|
AbleException(int theSeverity)
Construct a new exception of the specified severity. |
|
AbleException(int theSeverity,
java.lang.String theMessage,
java.lang.Throwable theThrowable)
Construct a new exception with the specified message, Throwable, and ABLE severity. |
|
AbleException(java.lang.String theMessage)
Construct a new exception with the specified message of an unspecified severity. |
|
AbleException(java.lang.String theErrorMessage,
java.util.Collection collection)
Construct a new exception with a Collection of objects. |
|
AbleException(java.lang.String theMessage,
java.lang.Object theObject)
Construct a new exception with the specified message and object. |
|
AbleException(java.lang.String theMessage,
java.lang.Object theObject,
java.lang.Throwable theThrowable)
Construct a new exception with the specified message, object, and throwable. |
|
AbleException(java.lang.String theMessage,
java.lang.Throwable theThrowable)
Construct a new exception with the specified message and Throwable. |
Method Summary | |
---|---|
static java.lang.String |
Copyright()
Determine the copyright of this class. |
java.util.Collection |
getExceptionBeans()
Return the beans which caused exceptions. |
java.util.Collection |
getExceptions()
Return the exceptions to interrogate. |
java.lang.String |
getLocalizedMessage()
Overridden because of tendency to use nested exception text as exception text. |
AbleMessageContainer |
getMessageContainer()
Gets the AbleMessageContainer in this exception. |
java.lang.Object |
getObject()
Returns the object for the handler to interrogate. |
long |
getSeverity()
Returns the severity of the exception. |
boolean |
hasMessageContainer()
Indicates whether this exception provides an AbleMessageContainer for creating a localized message at a late time rather than a pre-resolved message text. |
void |
setObject(java.lang.Object theObject)
Sets the object for the exception. |
void |
setSeverity(int theSeverity)
Sets the severity of the exception. |
java.lang.String |
toString()
Retrieve a string describing the exception. |
Methods inherited from class java.rmi.RemoteException |
---|
getMessage, printStackTrace, printStackTrace, printStackTrace |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected long severity
protected java.lang.Object object
protected AbleMessageContainer myMessageContainer
Constructor Detail |
public AbleException()
public AbleException(int theSeverity)
theSeverity
- An Able message value indicating the severity of
the exception.public AbleException(java.lang.String theMessage)
theMessage
- A message passed on to RemoteException.public AbleException(java.lang.String theMessage, java.lang.Object theObject)
theMessage
- A message passed on to RemoteException.theObject
- An object for the handler to interrogate. In practice, this is a
bean that threw the exception, or if a container, a collection of
AbleExceptions each of which represent beans that threw exceptions
while processing the container's list of beans.public AbleException(java.lang.String theMessage, java.lang.Object theObject, java.lang.Throwable theThrowable)
theMessage
- A message passed on to RemoteException.theObject
- An object for the handler to interrogate. In practice, this is a
bean that threw the exception, or if a container, a collection of
AbleExceptions each of which represent beans that threw exceptions
while processing the container's list of beans.theThrowable
- An exception passed on to RemoteException.public AbleException(java.lang.String theErrorMessage, java.util.Collection collection)
theErrorMessage
- collection
- A collection of AbleExceptions each of which represent beans
that threw exceptions while processing a list of beans.public AbleException(java.lang.String theMessage, java.lang.Throwable theThrowable)
theMessage
- A message passed on to RemoteException.theThrowable
- An exception passed on to RemoteException.public AbleException(int theSeverity, java.lang.String theMessage, java.lang.Throwable theThrowable)
theSeverity
- An Able message constant indicating the severity of
this exception.theMessage
- A message passed on to RemoteException.theThrowable
- An exception passed on to RemoteException.public AbleException(AbleMessageContainer theMessageContainer, java.lang.String theMessage)
theMessageContainer
- The elements of a locale-specific message.theMessage
- A message passed on to RemoteException.public AbleException(AbleMessageContainer theMessageContainer, java.lang.String theMessage, java.lang.Throwable theThrowable)
theMessageContainer
- The elements of a locale-specific message.theMessage
- A message passed on to RemoteException.theThrowable
- An exception passed on to RemoteException.Method Detail |
public boolean hasMessageContainer()
public AbleMessageContainer getMessageContainer()
public void setSeverity(int theSeverity)
theSeverity
- An Able message severity constant.public long getSeverity()
public void setObject(java.lang.Object theObject)
theObject
- An object for the handler to interrogate. In practice, this is a
bean that threw the exception, or if a container, a collection of
AbleExceptions each of which represent beans that threw exceptions
while processing a list of beans.public java.lang.Object getObject()
public java.util.Collection getExceptions()
try { agent.process(); } catch (AbleException rmx) { Collection beans = rmx.getExceptions(); Iterator i = beans.iterator(); while (i.hasNext()) { AbleException exp = (AbleException)i.next(); AbleBean bean = (AbleBean)exp.getObject(); // do something to the bean to recover? bean.reset(); } }
public java.util.Collection getExceptionBeans()
try { agent.process(); } catch (AbleException rmx) { Collection beans = rmx.getExceptionBeans(); Iterator i = beans.iterator(); while (i.hasNext()) { AbleBean bean = (AbleBean)i.next(); // do something to the bean to recover? bean.reset(); } }
public java.lang.String toString()
If the exception contains an object
, the output consists
of the exception text, a line feed, and the result of calling
toString on the object.
If the object contained is actually a collection, then the output consists of the exception text, and for each object in the collection, a line feed and the result of calling toString on each object.
Note that this does not display the content of an AbleMessageContainer wart!.
toString
in class java.lang.Throwable
public java.lang.String getLocalizedMessage()
Does not utilize the myMessageContainer
wart even if one exists.
getLocalizedMessage
in class java.lang.Throwable
public static java.lang.String Copyright()
|
ABLE 2.0.0 07/02/2003 10:25:01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |