Design patterns: elements of reusable object-oriented software
Design patterns: elements of reusable object-oriented software
Java Virtual Machine Specification
Java Virtual Machine Specification
Java Reflection in Action (In Action series)
Java Reflection in Action (In Action series)
Java(TM) Language Specification, The (3rd Edition) (Java (Addison-Wesley))
Java(TM) Language Specification, The (3rd Edition) (Java (Addison-Wesley))
Hi-index | 0.00 |
There are times during the normal execution flow of programs, when an object of a class wishes to be notified about some special event which may take place in a method it calls. Some other times, this event might not happen in the directly called method, but in another one, deeper in the call stack, beyond the knowledge of the caller class. To overcome this, a common solution is to create structures close to the Observer design pattern, which ends up coupling the caller class with the called class and lacks asyn-chronous behavior. In order not to couple the classes, exception handling can be used, as long as the premature termination of the called method is not a concern. The present essay proposes a solution to fill this gap and describes the initial concept of a technique to asynchronously handle events triggered inside any method within the current call stack, without coupling classes.