[jboss-cvs] JBossAS SVN: r73440 - in trunk/system/src/main/org/jboss/deployers/spi/management: deploy and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri May 16 07:30:46 EDT 2008
Author: scott.stark at jboss.org
Date: 2008-05-16 07:30:45 -0400 (Fri, 16 May 2008)
New Revision: 73440
Added:
trunk/system/src/main/org/jboss/deployers/spi/management/deploy/
trunk/system/src/main/org/jboss/deployers/spi/management/deploy/DeploymentProgress.java
trunk/system/src/main/org/jboss/deployers/spi/management/deploy/DeploymentStatus.java
trunk/system/src/main/org/jboss/deployers/spi/management/deploy/DeploymentTarget.java
trunk/system/src/main/org/jboss/deployers/spi/management/deploy/DeploymentTargetID.java
trunk/system/src/main/org/jboss/deployers/spi/management/deploy/ProgressEvent.java
trunk/system/src/main/org/jboss/deployers/spi/management/deploy/ProgressListener.java
Modified:
trunk/system/src/main/org/jboss/deployers/spi/management/ManagementView.java
Log:
JBAS-5370, checkpoint api update progress
Modified: trunk/system/src/main/org/jboss/deployers/spi/management/ManagementView.java
===================================================================
--- trunk/system/src/main/org/jboss/deployers/spi/management/ManagementView.java 2008-05-16 11:28:14 UTC (rev 73439)
+++ trunk/system/src/main/org/jboss/deployers/spi/management/ManagementView.java 2008-05-16 11:30:45 UTC (rev 73440)
@@ -22,8 +22,10 @@
package org.jboss.deployers.spi.management;
+import java.net.URL;
import java.util.Set;
+import org.jboss.deployers.spi.management.deploy.DeploymentProgress;
import org.jboss.managed.api.ComponentType;
import org.jboss.managed.api.DeploymentTemplateInfo;
import org.jboss.managed.api.ManagedComponent;
@@ -68,6 +70,17 @@
public Set<String> getDeploymentNamesForType(String type);
/**
+ * Add raw deployment content to the profile.
+ *
+ * @param name phase unique name
+ * @param phase the phase this deployment applies to
+ * @param contentURL - URL for obtaining the deployment archive
+ * @return DeploymentProgress progress object for the deployment
+ */
+ public DeploymentProgress addDeployment(String name, DeploymentPhase phase,
+ URL contentURL);
+
+ /**
* Search for a deployment matching the regex expression.
* @param regex - the regex to query deployment name
* @return the deployment name.
Added: trunk/system/src/main/org/jboss/deployers/spi/management/deploy/DeploymentProgress.java
===================================================================
--- trunk/system/src/main/org/jboss/deployers/spi/management/deploy/DeploymentProgress.java (rev 0)
+++ trunk/system/src/main/org/jboss/deployers/spi/management/deploy/DeploymentProgress.java 2008-05-16 11:30:45 UTC (rev 73440)
@@ -0,0 +1,75 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This 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 software 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 software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.deployers.spi.management.deploy;
+
+import java.util.List;
+
+/**
+ * An interface for tracking the progress of a deployment upload to a
+ * profile via the profile service ManagementView spi.
+ *
+ * @author Scott.Stark at jboss.org
+ * @version $Revision:$
+ */
+public interface DeploymentProgress
+{
+ /**
+ * Retrieve the status of the deployment
+ *
+ * @return the status
+ */
+ DeploymentStatus getDeploymentStatus();
+
+ /**
+ * Retrieve the resulting deployment module ids
+ *
+ * @return the deployment module ids
+ */
+ List<DeploymentTargetID> getDeploymentTargetIDs();
+
+ /**
+ * Cancels the deployment
+ *
+ */
+ void cancel();
+
+ /**
+ * Stops the deployment
+ *
+ */
+ void stop();
+
+ /**
+ * Add a progress listener
+ *
+ * @param listener the listener
+ */
+ void addProgressListener(ProgressListener listener);
+
+ /**
+ * Remove a progress listener
+ *
+ * @param listener the listener
+ */
+ void removeProgressListener(ProgressListener listener);
+
+}
Added: trunk/system/src/main/org/jboss/deployers/spi/management/deploy/DeploymentStatus.java
===================================================================
--- trunk/system/src/main/org/jboss/deployers/spi/management/deploy/DeploymentStatus.java (rev 0)
+++ trunk/system/src/main/org/jboss/deployers/spi/management/deploy/DeploymentStatus.java 2008-05-16 11:30:45 UTC (rev 73440)
@@ -0,0 +1,83 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This 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 software 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 software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.deployers.spi.management.deploy;
+
+import org.jboss.deployers.spi.management.ManagementView;
+
+/**
+ * A deployment progress interface used to notify a caller of
+ * {@linkplain ManagementView#addDeployment(String, org.jboss.managed.api.ManagedDeployment.DeploymentPhase, java.net.URL)}
+ * @author Scott.Stark at jboss.org
+ * @version $Revision:$
+ */
+public interface DeploymentStatus
+{
+ public enum StateType {
+ UPLOADING, DEPLOYING, RUNNING, COMPLETED, FAILED, CANCELLED
+ }
+ public enum CommandType {
+ DISTRIBUTE, START, STOP, UNDEPLOY, REDEPLOY
+ }
+
+ /**
+ * Get the state of the deployment
+ *
+ * @return the state
+ */
+ StateType getState();
+
+ /**
+ * The deployment command
+ *
+ * @return the command
+ */
+ CommandType getCommand();
+
+ /**
+ * Get the current status message
+ *
+ * @return the message
+ */
+ String getMessage();
+
+ /**
+ * Is the deployment complete
+ *
+ * @return true when complete, false otherwise
+ */
+ boolean isCompleted();
+
+ /**
+ * Has the deployment failed
+ *
+ * @return true when failed, false otherwise
+ */
+ boolean isFailed();
+
+ /**
+ * Is the deployment in progress
+ *
+ * @return true when in progress, false otherwise
+ */
+ boolean isRunning();
+
+}
Added: trunk/system/src/main/org/jboss/deployers/spi/management/deploy/DeploymentTarget.java
===================================================================
--- trunk/system/src/main/org/jboss/deployers/spi/management/deploy/DeploymentTarget.java (rev 0)
+++ trunk/system/src/main/org/jboss/deployers/spi/management/deploy/DeploymentTarget.java 2008-05-16 11:30:45 UTC (rev 73440)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This 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 software 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 software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.deployers.spi.management.deploy;
+
+import org.jboss.managed.api.ManagedDeployment.DeploymentPhase;
+
+/**
+ * A deployment target representation.
+ *
+ * @author Scott.Stark at jboss.org
+ * @version $Revision:$
+ */
+public interface DeploymentTarget
+{
+ /**
+ * Get the deployment name
+ *
+ * @return the name
+ */
+ String getName();
+ /**
+ * Get the phase the deployment is associated with
+ * @return
+ */
+ DeploymentPhase getPhase();
+
+ /**
+ * Get the deployment description
+ *
+ * @return the description
+ */
+ String getDescription();
+}
Added: trunk/system/src/main/org/jboss/deployers/spi/management/deploy/DeploymentTargetID.java
===================================================================
--- trunk/system/src/main/org/jboss/deployers/spi/management/deploy/DeploymentTargetID.java (rev 0)
+++ trunk/system/src/main/org/jboss/deployers/spi/management/deploy/DeploymentTargetID.java 2008-05-16 11:30:45 UTC (rev 73440)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This 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 software 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 software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.deployers.spi.management.deploy;
+
+/**
+ * A representation of a deployment target and the top-level deployment id.
+ *
+ * @author Scott.Stark at jboss.org
+ * @version $Revision:$
+ */
+public interface DeploymentTargetID
+{
+ /**
+ * Get the target
+ *
+ * @return the target
+ */
+ DeploymentTarget getTarget();
+
+ /**
+ * Get the name of the deployment
+ *
+ * @return the id
+ */
+ String getName();
+
+ /**
+ * Return the identifier of this module
+ *
+ * @return the identifier
+ */
+ String toString();
+}
Added: trunk/system/src/main/org/jboss/deployers/spi/management/deploy/ProgressEvent.java
===================================================================
--- trunk/system/src/main/org/jboss/deployers/spi/management/deploy/ProgressEvent.java (rev 0)
+++ trunk/system/src/main/org/jboss/deployers/spi/management/deploy/ProgressEvent.java 2008-05-16 11:30:45 UTC (rev 73440)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This 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 software 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 software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.deployers.spi.management.deploy;
+
+import java.io.Serializable;
+
+/**
+ * A deployment progress event object.
+ *
+ * @author Scott.Stark at jboss.org
+ * @version $Revision:$
+ */
+public class ProgressEvent
+ implements Serializable
+{
+ private static final long serialVersionUID = 1;
+ private DeploymentTargetID deploymentTargetID;
+ private DeploymentStatus status;
+
+ public ProgressEvent(DeploymentTargetID deploymentTargetID, DeploymentStatus status)
+ {
+ super();
+ this.deploymentTargetID = deploymentTargetID;
+ this.status = status;
+ }
+
+ public DeploymentTargetID getDeploymentName()
+ {
+ return deploymentTargetID;
+ }
+ public DeploymentStatus getStatus()
+ {
+ return status;
+ }
+}
Added: trunk/system/src/main/org/jboss/deployers/spi/management/deploy/ProgressListener.java
===================================================================
--- trunk/system/src/main/org/jboss/deployers/spi/management/deploy/ProgressListener.java (rev 0)
+++ trunk/system/src/main/org/jboss/deployers/spi/management/deploy/ProgressListener.java 2008-05-16 11:30:45 UTC (rev 73440)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This 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 software 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 software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.deployers.spi.management.deploy;
+
+/**
+ * A progress notification listener interface
+ *
+ * @author Scott.Stark at jboss.org
+ * @version $Revision:$
+ */
+public interface ProgressListener
+{
+ void progressEvent(ProgressEvent eventInfo);
+}
More information about the jboss-cvs-commits
mailing list