[jboss-svn-commits] JBL Code SVN: r32623 - in labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance: process and 1 other directory.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri Apr 23 13:56:55 EDT 2010


Author: whitingjr
Date: 2010-04-23 13:56:54 -0400 (Fri, 23 Apr 2010)
New Revision: 32623

Added:
   labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/process/
   labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/process/DstatHandler.java
Log:
Handler for lifecycle events.

Added: labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/process/DstatHandler.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/process/DstatHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/process/DstatHandler.java	2010-04-23 17:56:54 UTC (rev 32623)
@@ -0,0 +1,45 @@
+ /*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * 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.jbossts.performance.process;
+
+import org.apache.commons.exec.ExecuteException;
+import org.apache.commons.exec.ExecuteResultHandler;
+import org.apache.log4j.Logger;
+
+public class DstatHandler implements ExecuteResultHandler
+{
+   private Logger logger = Logger.getLogger(DstatHandler.class);
+   @Override
+   public void onProcessComplete(int exitValue)
+   {
+      logger.info("dstat process completed");
+
+   }
+
+   @Override
+   public void onProcessFailed(ExecuteException e)
+   {
+      logger.info("dstat process has been killed");
+   }
+
+}



More information about the jboss-svn-commits mailing list