com.ibm.as400.opnav
Class TerminationManager

java.lang.Object
  |
  +--com.ibm.as400.opnav.TerminationManager

public class TerminationManager
extends java.lang.Object

Provides a facility for Java components to be notified when Operations Navigator is about to exit. TerminationManager fires a java.awt.event.ActionEvent to each registered listener.

After performing appropriate cleanup processing for the component, a listener may choose either to allow termination processing to continue, or to abort termination. To abort termination, the listener should throw a java.lang.RuntimeException (or one of its subclasses). If this is done, termination processing will be aborted and Operations Navigator will remain active.

Since:
v5r1m0

Method Summary
static void addTerminationListener(java.awt.event.ActionListener l)
          Register an instance of java.awt.event.ActionListener which will be notified, via a call to actionPerformed(), that Operations Navigator is about to exit.
static void removeTerminationListener(java.awt.event.ActionListener l)
          Removes a previously added termination listener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addTerminationListener

public static void addTerminationListener(java.awt.event.ActionListener l)
Register an instance of java.awt.event.ActionListener which will be notified, via a call to actionPerformed(), that Operations Navigator is about to exit.

Parameters:
l - The action listener to be notified.
Since:
v5r1m0

removeTerminationListener

public static void removeTerminationListener(java.awt.event.ActionListener l)
Removes a previously added termination listener. No action is taken if the specified listener was not previously added.

Parameters:
l - The action listener to be removed.
Since:
v5r1m0