[jbosstools-commits] JBoss Tools SVN: r30870 - in trunk/as: plugins/org.jboss.ide.eclipse.as.management.as7/src/org/jboss/ide/eclipse/as/management/as7/deployment and 2 other directories.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Wed Apr 27 08:05:26 EDT 2011


Author: adietish
Date: 2011-04-27 08:05:26 -0400 (Wed, 27 Apr 2011)
New Revision: 30870

Modified:
   trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/IJBoss7Manager.java
   trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7ManagerProxy.java
   trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/src/org/jboss/ide/eclipse/as/management/as7/deployment/AS7Manager.java
   trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/src/org/jboss/ide/eclipse/as/management/as7/deployment/JBoss7Manager.java
   trunk/as/tests/org.jboss.ide.eclipse.as.management.as7.tests/src/org/jboss/ide/eclipse/as/management/as7/tests/AS7ManagerIntegrationTest.java
   trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/server/JBossManagerTest.java
Log:
[JBIDE-8793] added #shutdown to AS7Manager

Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/IJBoss7Manager.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/IJBoss7Manager.java	2011-04-27 11:49:58 UTC (rev 30869)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/IJBoss7Manager.java	2011-04-27 12:05:26 UTC (rev 30870)
@@ -7,7 +7,7 @@
  * 
  * Contributors: 
  * Red Hat, Inc. - initial API and implementation 
- ******************************************************************************/ 
+ ******************************************************************************/
 package org.jboss.ide.eclipse.as.core.server.internal.v7;
 
 import java.io.File;
@@ -23,44 +23,59 @@
 	/**
 	 * Asynchronously deploy a file to a server
 	 * 
-	 * @param host The host
-	 * @param port The port
-	 * @param name The deployment's name
-	 * @param file The file to be deployed
-	 * @param monitor The progress monitor
+	 * @param host
+	 *            The host
+	 * @param port
+	 *            The port
+	 * @param name
+	 *            The deployment's name
+	 * @param file
+	 *            The file to be deployed
+	 * @param monitor
+	 *            The progress monitor
 	 * 
 	 * @return Not sure what to return yet
-	 * @throws Exception 
+	 * @throws Exception
 	 */
-	public IJBoss7DeploymentResult deployAsync(String host, int port, 
-					String deploymentName, File file, IProgressMonitor monitor) throws Exception;
+	public IJBoss7DeploymentResult deployAsync(String host, int port,
+			String deploymentName, File file, IProgressMonitor monitor) throws Exception;
 
 	/**
 	 * Synchronously deploy a file to a server
 	 * 
-	 * @param host The host
-	 * @param port The port
-	 * @param name The deployment's name
-	 * @param file The file to be deployed
-	 * @param monitor The progress monitor
+	 * @param host
+	 *            The host
+	 * @param port
+	 *            The port
+	 * @param name
+	 *            The deployment's name
+	 * @param file
+	 *            The file to be deployed
+	 * @param monitor
+	 *            The progress monitor
 	 * 
 	 * @return Not sure what to return yet
-	 * @throws Exception 
+	 * @throws Exception
 	 */
-	public IJBoss7DeploymentResult deploySync(String host, int port, 
+	public IJBoss7DeploymentResult deploySync(String host, int port,
 			String deploymentName, File file, IProgressMonitor monitor) throws Exception;
-	
+
 	/**
 	 * Asynchronously undeploy a file to a server
 	 * 
-	 * @param host The host
-	 * @param port The port
-	 * @param name The deployment's name
-	 * @param file The file to be deployed
-	 * @param monitor The progress monitor
+	 * @param host
+	 *            The host
+	 * @param port
+	 *            The port
+	 * @param name
+	 *            The deployment's name
+	 * @param file
+	 *            The file to be deployed
+	 * @param monitor
+	 *            The progress monitor
 	 * 
 	 * @return Not sure what to return yet
-	 * @throws Exception 
+	 * @throws Exception
 	 */
 	public IJBoss7DeploymentResult undeployAsync(String host, int port,
 			String deploymentName, boolean removeFile, IProgressMonitor monitor) throws Exception;
@@ -68,28 +83,43 @@
 	/**
 	 * Synchronously undeploy a file to a server
 	 * 
-	 * @param host The host
-	 * @param port The port
-	 * @param name The deployment's name
-	 * @param file The file to be deployed
-	 * @param monitor The progress monitor
+	 * @param host
+	 *            The host
+	 * @param port
+	 *            The port
+	 * @param name
+	 *            The deployment's name
+	 * @param file
+	 *            The file to be deployed
+	 * @param monitor
+	 *            The progress monitor
 	 * 
 	 * @return Not sure what to return yet
-	 * @throws Exception 
+	 * @throws Exception
 	 */
 	public IJBoss7DeploymentResult syncUndeploy(String host, int port,
 			String deploymentName, boolean removeFile, IProgressMonitor monitor) throws Exception;
-	
+
 	/**
 	 * Returns the state for a given deployment name on a given host and port.
 	 * 
-	 * @param host the host to query
-	 * @param port the port to contact it on
-	 * @param deploymentName the name of the deployment that shall be queried
+	 * @param host
+	 *            the host to query
+	 * @param port
+	 *            the port to contact it on
+	 * @param deploymentName
+	 *            the name of the deployment that shall be queried
 	 * 
 	 * @return the state of the deployment
 	 * @throws Exception
 	 */
 	public JBoss7DeploymentState getDeploymentState(String host, int port, String deploymentName) throws Exception;
-	
+
+	/**
+	 * Stops the given server
+	 * 
+	 * @throws JBoss7ManangerException
+	 * @throws Exception 
+	 */
+	public void stop(String host, int port) throws Exception;
 }

Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7ManagerProxy.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7ManagerProxy.java	2011-04-27 11:49:58 UTC (rev 30869)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7ManagerProxy.java	2011-04-27 12:05:26 UTC (rev 30870)
@@ -42,6 +42,10 @@
 		return checkedGetService().getDeploymentState(host, port, deploymentName);
 	}
 
+	public void stop(String host, int port) throws Exception {
+		checkedGetService().stop(host, port);
+	}
+
 	private IJBoss7Manager checkedGetService() throws JBoss7ManangerException {
 		IJBoss7Manager service = getService();
 		if (service == null) {

Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/src/org/jboss/ide/eclipse/as/management/as7/deployment/AS7Manager.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/src/org/jboss/ide/eclipse/as/management/as7/deployment/AS7Manager.java	2011-04-27 11:49:58 UTC (rev 30869)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/src/org/jboss/ide/eclipse/as/management/as7/deployment/AS7Manager.java	2011-04-27 12:05:26 UTC (rev 30870)
@@ -139,7 +139,7 @@
 	 * 
 	 * @throws JBoss7ManangerException
 	 */
-	public void shutdown() throws JBoss7ManangerException {		
+	public void stop() throws JBoss7ManangerException {		
 		ModelNode request = new ModelNode();
 		request.get(OP).set(SHUTDOWN);
 		quietlyExecute(request);

Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/src/org/jboss/ide/eclipse/as/management/as7/deployment/JBoss7Manager.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/src/org/jboss/ide/eclipse/as/management/as7/deployment/JBoss7Manager.java	2011-04-27 11:49:58 UTC (rev 30869)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/src/org/jboss/ide/eclipse/as/management/as7/deployment/JBoss7Manager.java	2011-04-27 12:05:26 UTC (rev 30870)
@@ -50,4 +50,8 @@
 		AS7Manager manager = new AS7Manager(host, port);
 		return manager.getDeploymentState(deploymentName);
 	}
+	
+	public void stop(String host, int port) throws Exception {
+		new AS7Manager(host, port).stop();
+	}
 }

Modified: trunk/as/tests/org.jboss.ide.eclipse.as.management.as7.tests/src/org/jboss/ide/eclipse/as/management/as7/tests/AS7ManagerIntegrationTest.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.management.as7.tests/src/org/jboss/ide/eclipse/as/management/as7/tests/AS7ManagerIntegrationTest.java	2011-04-27 11:49:58 UTC (rev 30869)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.management.as7.tests/src/org/jboss/ide/eclipse/as/management/as7/tests/AS7ManagerIntegrationTest.java	2011-04-27 12:05:26 UTC (rev 30870)
@@ -162,7 +162,7 @@
 	@Test
 	public void canShutdown() throws JBoss7ManangerException, UnknownHostException, IOException {
 		assertTrue(AS7ManagerTestUtils.isListening(AS7ManagerTestUtils.HOST, AS7ManagerTestUtils.MGMT_PORT));
-		manager.shutdown();
+		manager.stop();
 		assertFalse(AS7ManagerTestUtils.isListening(AS7ManagerTestUtils.HOST, AS7ManagerTestUtils.MGMT_PORT));
 	}
 }
\ No newline at end of file

Modified: trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/server/JBossManagerTest.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/server/JBossManagerTest.java	2011-04-27 11:49:58 UTC (rev 30869)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/server/JBossManagerTest.java	2011-04-27 12:05:26 UTC (rev 30870)
@@ -85,5 +85,8 @@
 				throws JBoss7ManangerException {
 			throw new UnsupportedOperationException();
 		}
+		
+		public void stop(String host, int port) throws JBoss7ManangerException {
+		}
 	}
 }



More information about the jbosstools-commits mailing list