All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.zkoss.zk.ui.util.DesktopCleanup Maven / Gradle / Ivy

There is a newer version: 10.0.0-jakarta
Show newest version
/* DesktopCleanup.java

	Purpose:
		
	Description:
		
	History:
		Thu Mar 30 18:28:18     2006, Created by tomyeh

Copyright (C) 2006 Potix Corporation. All Rights Reserved.

{{IS_RIGHT
	This program is distributed under LGPL Version 2.1 in the hope that
	it will be useful, but WITHOUT ANY WARRANTY.
}}IS_RIGHT
*/
package org.zkoss.zk.ui.util;

import org.zkoss.zk.ui.Desktop;

/**
 * Used to clean up a desktop.
 *
 * 

There are two ways to use this interface. *

First: add the listener at the run time

*

Call {@link Desktop#addListener} to register it. * *

Second: use configuration

*
    *
  1. Specify a class that implements this interface * in WEB-INF/zk.xml as a listener. *
  2. *
  3. Then, each time ZK loader is destroying a desktop, an instance of * the specified class is instantiated and {@link #cleanup} is called.
  4. *
* * @author tomyeh */ public interface DesktopCleanup { /** called when a desktop is about to be destroyed. * *

If this method throws an exception, the error message is * only logged (user won't see it). */ public void cleanup(Desktop desktop) throws Exception; }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy