/*
 This file is part of the software framework JStatCom, 
 a library for building applications for data based analysis.

 Copyright (C) 2000-2005  Markus Kraetzig

 This library is free software; you can redistribute it and/or modify
 it under the terms of the GNU Lesser General Public License as
 published by the Free Software Foundation; either version 2.1 of the
 License, or (at your option) any later version.

 This library is distributed in the hope that it will be useful, but
 WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 Lesser General Public License for more details.

 You should have received a copy of the GNU Lesser General Public
 License along with this library; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 USA
 */

package com.jstatcom.engine;

import java.util.EventListener;


/**
 * Interface to be implemented by listeners to PCall objects.
 * All calls are synchronized with the Swing EventDispatchingThread, 
 * because interested listeners usually are graphical objects that invoke some
 * kind of GUI operation. An empty convenience implementation is 
 * PCallAdapter.
 *
 * @author A. Benkwitz, Markus Kraetzig
 * @see com.jstatcom.engine.PCall
 * @see com.jstatcom.engine.PCallAdapter
 *
 */
public interface PCallListener extends EventListener {
	/**
	 * Invoked when a procedure finishes, no matter whether the call 
	 * was successful, interrupted or erroneous.
	 * 
	 * @param pc the calling object
	 */
	void finished(PCall pc);

	/**
	 * Invoked when a procedure was queued in the main 
	 * worker thread.
	 * 
	 * @param pc the calling object
	 */
	void queued(PCall pc);

	/**
	 * Invoked when the procedure's run method was called within
	 * the main worker thread.
	 * 
	 * @param pc the calling object
	 */
	void started(PCall pc);

	/**
	 * Invoked when a procedure finished successfully and was not
	 * interrupted. This method is a convenience implementation,
	 * because it is the most common case. The functionality is the
	 * same as using finished plus checking the
	 * source call for success.
	 */
	void success();

}

 

Ads help maintain this website.