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

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

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

	Purpose:
		
	Description:
		
	History:
		Thu Aug 24 23:31:23     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 java.util.List;

import org.zkoss.zk.ui.Execution;

/**
 * Used to clean up an execution.
 *
 * 

How this interface is used. *

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

If this method throws an exception, the stack trace will be logged, * and the error message will be displayed at the client. * *

When this method is invoked, the execution is still activated, * so you can create components here. * * @param exec the execution to clean up. * @param parent the previous execution, or null if no previous at all * @param errs a list of exceptions (java.lang.Throwable) if any exception * occurred before this method is called, or null if no exception at all. * Note: you can manipulate the list directly to add or clean up exceptions. * For example, if exceptions are fixed correctly, you can call errs.clear() * such that no error message will be displayed at the client. */ public void cleanup(Execution exec, Execution parent, List errs) throws Exception; }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy