Thread: [Ejtools-cvs] CVS: thirdparty/sun/jsr88/src/main/javax/enterprise/deploy/spi/status ClientConfigurat
Brought to you by:
letiemble
Update of /cvsroot/ejtools/thirdparty/sun/jsr88/src/main/javax/enterprise/deploy/spi/status In directory usw-pr-cvs1:/tmp/cvs-serv31212/sun/jsr88/src/main/javax/enterprise/deploy/spi/status Added Files: ClientConfiguration.java DeploymentStatus.java ProgressEvent.java ProgressListener.java ProgressObject.java Log Message: Initial Import --- NEW FILE: ClientConfiguration.java --- package javax.enterprise.deploy.spi.status; import java.io.Serializable; import javax.enterprise.deploy.spi.exceptions.ClientExecuteException; /** * The ClientConfiguration object configures an Application * Client for execution by a deployment tool. This class * should resolve the settings for installing and running * the application client. */ /** * The ClientConfiguration object installs, configures and * executes an Application Client. This class resolves the * settings for installing and running the application client. */ public interface ClientConfiguration extends Serializable { /** * This method performs an exec and starts the * application client running in another process. * * @throws ClientExecuteException when the configuration * is incomplete. */ public void execute() throws ClientExecuteException; } --- NEW FILE: DeploymentStatus.java --- package javax.enterprise.deploy.spi.status; import javax.enterprise.deploy.shared.StateType; import javax.enterprise.deploy.shared.CommandType; import javax.enterprise.deploy.shared.ActionType; /** * The DeploymentStatus interface provides information about * the progress status of a deployment action. */ public interface DeploymentStatus { /** * Retrieve the StateType value. * * @return State value */ public int getState(); /** * Retrieve the deployment CommandType of this event. * * @return command value */ public int getCommand(); /** * Retrieve the deployment ActionType for this event. * * @return action value */ public int getAction(); /** * Retrieve any additional information about the * status of this event. * * @return 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 --- package javax.enterprise.deploy.spi.status; import javax.enterprise.deploy.spi.TargetModuleID; import java.util.EventObject; /** * An event which indicates that a deployment * status change has occurred. * * @see ProgressObjectListener * @see ProgressObject */ public class ProgressEvent extends EventObject { private DeploymentStatus statuscode; private TargetModuleID targetModuleID; /** * Creates a new object representing a deployment * progress event. * * @param source the object on which the Event initially occurred. * @param sCode the object containing the status * information. */ public ProgressEvent (Object source, TargetModuleID targetModuleID, DeploymentStatus sCode) { super(source); this.statuscode = sCode; this.targetModuleID = targetModuleID; } /** * Retrieve the TargetModuleID for this event * * @return the object containing the TargetModuleID */ public TargetModuleID getTargetModuleID() { return targetModuleID; } /** * Retrieve the status information. * * @return the object containing the status information. */ public DeploymentStatus getDeploymentStatus() { return statuscode; } } --- NEW FILE: ProgressListener.java --- package javax.enterprise.deploy.spi.status; import java.util.EventListener; /** * The listener interface for receiving deployment * progress events. */ 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 --- 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 <code> optional</code> 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> */ 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. * * @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 <code>true</code> 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. * * @throws 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 <code>true</code> 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. * * @throws 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 The listener to receive events * @see ProgressEvent */ public void addProgressListener(ProgressListener pol); /** * Remove a ProgressObject listener. * * @param The listener being removed * @see ProgressEvent */ public void removeProgressListener(ProgressListener pol); } |