|
Orbital library | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Throwable orbital.util.Activation
public abstract class Activation
Activation is the base class for conditional exception handling. It adds tracing, delegation and rejection to java's common terminal exception handling capabilities.
Conditional exceptions thrown with Activation semantics can be:
The creator should be set up as follows:
// Activation derivative MyActivation Activation frame = new MyActivation(myCaller); try { // something like if (some_condition) frame.raise(some_exception_info); } catch (Activation a) { if (a != frame) throw a; // rethrow foreign conditional exceptions Object info = a.info(); // deal with information somehow }Conditional exceptions can be
Throwable
,
Exception
,
Serialized FormConstructor Summary | |
---|---|
protected |
Activation(Activation caller)
Creates a new activation. |
Method Summary | |
---|---|
protected void |
handle(java.lang.Object information)
Initiate normal exception handling in the corresponding catch-clause. |
java.lang.Object |
info()
Get this exception's information that is to be handled. |
java.lang.Object |
raise(java.lang.Object information)
Raises this conditional exception with additional information. |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected Activation(Activation caller)
caller
- the activation corresponding to the method that called this.Method Detail |
---|
public java.lang.Object raise(java.lang.Object information) throws Activation
This method should be overwritten in a concrete class to define reactional behaviour. It is called by a descendant to try to send an object back the activation chain. This implementation will deliver the conditional exception to the outer caller up the activation chain.
Conditional exceptions thrown with Activation semantics can be:
information
- to be sent up the chain.
Activation
- to be caught by the creator who should retrieve the object by calling info()
.
java.lang.NullPointerException
- if this is the first activation in a chain.protected final void handle(java.lang.Object information) throws Activation
information
- any informational data the finite catch-handler needs to know about the exception.
Activation
info()
public final java.lang.Object info()
handle(Object)
.handle(java.lang.Object)
,
information
|
Orbital library 1.3.0: 11 Apr 2009 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |