|
What this is
Other links
The source code
/*
* DeployProgressUI.java
*
* Created on January 3, 2003, 12:33 PM
*/
package org.netbeans.modules.j2ee.deployment.impl.ui;
import javax.enterprise.deploy.spi.status.ProgressObject;
/**
*
* @author Jeri Lockhart
*/
public interface DeployProgressUI {
/**
* startProgressUI This must be called once after instantiation.
*
* @param obj ProgressObject returned from the first, or only, DeploymentManager command
* @param max The maximum value for the progress bar, a total for all the commands issued.
* Use the total count of ProgressEvents with StateTypes "Running" and "Completed"
* that will be raised for all ProgressObjects that will be attached to this
* Progress UI.
* To get an estimate, use log messages "ProgressEvent RUNNING..." and "ProgressEvent COMPLETED..."
* after executing the DeploymentManager command.
*
*/
public void startProgressUI(ProgressObject obj, int max) throws NullPointerException;
/**
* startProgressUI must be called once after instantiation.
* Use this override if the ProgressObject is not available yet.
* When you have the ProgressObject, use setProgressObject()
*
* @param max The maximum value for the progress bar, a total for all the commands issued.
* @param rate An estimated total number of times that the progress bar
* will be updated by ProgressEvents for all the ProgressObjects involved.
*
*/
public void startProgressUI(int max);
/**
* @param obj ProgressObject that is returned from DeploymentManager commands.
*
*/
public boolean setProgressObject(ProgressObject obj) ;
/**
* DeployProgressUI will write messages to
* the window when it hears a ProgressEvent for all StateTypes ("Running",
* "Completed", and "Released"), except "Failed". See addError() for StateType "Failed".
* You can call addMessage() if you want your own message to be written.
*
*/
public void addMessage(String message);
/**
* DeployProgressUI will write error messages to
* the window when a ProgressEvent with a StateType of "Failed" is posted.
* You can call addError() if you want your own error message
* to be written.
*
*/
public void addError(String errorMessage);
/*
* DeployProgressUI will use the ProgressObject to increment the
* progress bar.
* You can call recordWork() if you want to increment the
* progress bar explicitly.
*
*/
public void recordWork(int work) ;
/**
* Check if the progress has been cancelled by user pressing 'Cancel' button.
* @return true if progress has been cancelled.
*/
public boolean checkCancelled();
/**
* Add cancel handler
*/
public void addCancelHandler(CancelHandler handler);
/**
* Remove cancel handler
*/
public void removeCancelHandler(CancelHandler handler);
public interface CancelHandler {
public void handle();
}
}
|
| ... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.