[Ejtools-cvs] libraries/j2ee.deployment/src/main/javax/enterprise/deploy/spi/status ClientConfigurat
Brought to you by:
letiemble
From: <let...@us...> - 2003-12-14 10:50:53
|
Update of /cvsroot/ejtools/libraries/j2ee.deployment/src/main/javax/enterprise/deploy/spi/status In directory sc8-pr-cvs1:/tmp/cvs-serv4692/src/main/javax/enterprise/deploy/spi/status Added Files: ClientConfiguration.java DeploymentStatus.java ProgressEvent.java ProgressListener.java ProgressObject.java package.html Log Message: Add up-to-date implementation for the JSR 88. No need for the Sun one. --- NEW FILE: ClientConfiguration.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.enterprise.deploy.spi.status; import java.io.Serializable; import javax.enterprise.deploy.spi.exceptions.ClientExecuteException; /** * The ClientConfiguration object installs, configures and executes an Application * Client. This class resolves the settings for installing and running the application * client. * * @author Laurent Etiemble * @version $Revision: 1.1 $ * @since 1.0 */ public interface ClientConfiguration extends Serializable { /** * This method performs an exec and starts the application client running in another * process. * * @exception ClientExecuteException when the configuration is incomplete. */ public void execute() throws ClientExecuteException; } --- NEW FILE: DeploymentStatus.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.enterprise.deploy.spi.status; import javax.enterprise.deploy.shared.ActionType; import javax.enterprise.deploy.shared.CommandType; import javax.enterprise.deploy.shared.StateType; /** * The DeploymentStatus interface provides information about the progress status * of a deployment action. * * @author Laurent Etiemble * @version $Revision: 1.1 $ * @since 1.0 */ public interface DeploymentStatus { /** * Retrieve the StateType value. * * @return the StateType object */ public StateType getState(); /** * Retrieve the deployment CommandType of this event. * * @return the CommandType Object */ public CommandType getCommand(); /** * Retrieve the deployment ActionType for this event. * * @return the ActionType Object */ public ActionType getAction(); /** * Retrieve any additional information about the status of this event. * * @return the message text */ public String getMessage(); /** * A convience method to report if the operation is in the completed state. * * @return true if this command has completed successfully */ public boolean isCompleted(); /** * A convience method to report if the operation is in the failed state. * * @return true if this command has failed */ public boolean isFailed(); /** * A convience method to report if the operation is in the running state. * * @return true if this command is still running */ public boolean isRunning(); } --- NEW FILE: ProgressEvent.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.enterprise.deploy.spi.status; import java.util.EventObject; import javax.enterprise.deploy.spi.TargetModuleID; /** * An event which indicates that a deployment status change has occurred. * * @author Laurent Etiemble * @version $Revision: 1.1 $ * @since 1.0 */ public class ProgressEvent extends EventObject { private DeploymentStatus status; private TargetModuleID target; /** * Creates a new object representing a deployment progress event. * * @param source the object on which the Event initially occurred. * @param target Description of the Parameter * @param status Description of the Parameter */ public ProgressEvent(Object source, TargetModuleID target, DeploymentStatus status) { super(source); this.target = target; this.status = status; } /** * Retrieve the status information. * * @return the object containing the status information. */ public DeploymentStatus getDeploymentStatus() { return this.status; } /** * Retrieve the TargetModuleID for this event * * @return the object containing the TargetModuleID */ public TargetModuleID getTargetModuleID() { return this.target; } } --- NEW FILE: ProgressListener.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.enterprise.deploy.spi.status; import java.util.EventListener; /** * The listener interface for receiving deployment progress events. * * @author Laurent Etiemble * @version $Revision: 1.1 $ * @since 1.0 */ public interface ProgressListener extends EventListener { /** * Invoked when a deployment progress event occurs. * * @param event the progress status event. */ public void handleProgressEvent(ProgressEvent event); } --- NEW FILE: ProgressObject.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.enterprise.deploy.spi.status; import javax.enterprise.deploy.spi.TargetModuleID; import javax.enterprise.deploy.spi.exceptions.OperationUnsupportedException; /** * The ProgressObject interface tracks and reports the progress of the deployment * activities, distribute, start, stop, undeploy. <p> * * This class has an optional cancel method. The support of the cancel function can * be tested by the isCancelSupported method.</p> <p> * * The ProgressObject structure allows the user the option of polling for status * or to provide a callback.</p> * * @author Laurent Etiemble * @version $Revision: 1.1 $ * @since 1.0 */ public interface ProgressObject { /** * Retrieve the status of this activity. * * @return An object containing the status information. */ public DeploymentStatus getDeploymentStatus(); /** * Retrieve the list of TargetModuleIDs successfully processed or created by the * associated DeploymentManager operation. * * @return a list of TargetModuleIDs. */ public TargetModuleID[] getResultTargetModuleIDs(); /** * Return the ClientConfiguration object associated with the TargetModuleID. * * @param id The Target ID * @return ClientConfiguration for a given TargetModuleID or null if none exists. */ public ClientConfiguration getClientConfiguration(TargetModuleID id); /** * Tests whether the vendor supports a cancel opertation for deployment activities. * * @return true if canceling an activity is supported by this platform. */ public boolean isCancelSupported(); /** * (optional) A cancel request on an in-process operation stops all further processing * of the operation and returns the environment to it original state before the * operation was executed. An operation that has run to completion cannot be cancelled. * * @exception OperationUnsupportedException this optional command is not supported * by this implementation. */ public void cancel() throws OperationUnsupportedException; /** * Tests whether the vendor supports a stop opertation for deployment activities. * * @return true if canceling an activity is supported by this platform. */ public boolean isStopSupported(); /** * (optional) A stop request on an in-process operation allows the operation on * the current TargetModuleID to run to completion but does not process any of * the remaining unprocessed TargetModuleID objects. The processed TargetModuleIDs * must be returned by the method getResultTargetModuleIDs. * * @exception OperationUnsupportedException this optional command is not supported * by this implementation. */ public void stop() throws OperationUnsupportedException; /** * Add a listener to receive Progress events on deployment actions. * * @param pol the listener to receive events */ public void addProgressListener(ProgressListener pol); /** * Remove a ProgressObject listener. * * @param pol the listener being removed */ public void removeProgressListener(ProgressListener pol); } --- NEW FILE: package.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!-- EJTools, the Enterprise Java Tools Distributable under LGPL license. See terms of license at www.gnu.org. $Revision: 1.1 $ --> <html> <head/> <body> Provides J2EE Product Vendor deployment status implementation classes. <h2>Package Specification</h2> <ul> <li><a href="http://jcp.org/jsr/detail/88.jsp">JSR 88, J2EE Application Deployment</a></li> </ul> <h2>Related Documentation</h2> For overviews, tutorials, examples, guides, and tool documentation, please see: <ul> <li><a href="http://java.sun.com/j2ee/tools">J2EE Tools</a></li> </ul> </body> </html> |