001: /*
002: * JBoss, Home of Professional Open Source.
003: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
004: * as indicated by the @author tags. See the copyright.txt file in the
005: * distribution for a full listing of individual contributors.
006: *
007: * This is free software; you can redistribute it and/or modify it
008: * under the terms of the GNU Lesser General Public License as
009: * published by the Free Software Foundation; either version 2.1 of
010: * the License, or (at your option) any later version.
011: *
012: * This software is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public
018: * License along with this software; if not, write to the Free
019: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
021: */
022: package javax.enterprise.deploy.spi.status;
023:
024: import javax.enterprise.deploy.spi.TargetModuleID;
025: import javax.enterprise.deploy.spi.exceptions.OperationUnsupportedException;
026:
027: /**
028: * Tracks the progress of a deployment
029: *
030: * @author <a href="mailto:adrian@jboss.org">Adrian Brock</a>
031: * @version $Revision: 57196 $
032: */
033: public interface ProgressObject {
034: // Constants -----------------------------------------------------
035:
036: // Public --------------------------------------------------------
037:
038: /**
039: * Retrieve the status of the deployment
040: *
041: * @return the status
042: */
043: DeploymentStatus getDeploymentStatus();
044:
045: /**
046: * Retrieve the resulting target module ids
047: *
048: * @return the module ids
049: */
050: TargetModuleID[] getResultTargetModuleIDs();
051:
052: /**
053: * Return the client configuration associated with the module
054: *
055: * @param id the module id
056: * @return the client configuration or null if none exists
057: */
058: ClientConfiguration getClientConfiguration(TargetModuleID id);
059:
060: /**
061: * Is cancel supported
062: *
063: * @return true when cancel is supported, false otherwise
064: */
065: boolean isCancelSupported();
066:
067: /**
068: * Cancels the deployment
069: *
070: * @throws OperationUnsupportedException when cancel is not supported
071: */
072: void cancel() throws OperationUnsupportedException;
073:
074: /**
075: * Is stop supported
076: *
077: * @return true when stop is supported, false otherwise
078: */
079: boolean isStopSupported();
080:
081: /**
082: * Stops the deployment
083: *
084: * @throws OperationUnsupportedException when stop is not supported
085: */
086: void stop() throws OperationUnsupportedException;
087:
088: /**
089: * Add a progress listener
090: *
091: * @param listener the listener
092: */
093: void addProgressListener(ProgressListener listener);
094:
095: /**
096: * Remove a progress listener
097: *
098: * @param listener the listener
099: */
100: void removeProgressListener(ProgressListener listener);
101: }
|