[jboss-cvs] JBoss Profiler SVN: r555 - in branches/JBossProfiler2: src/main/org/jboss/profiler and 2 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Jun 24 07:32:27 EDT 2009


Author: jesper.pedersen
Date: 2009-06-24 07:32:27 -0400 (Wed, 24 Jun 2009)
New Revision: 555

Added:
   branches/JBossProfiler2/src/main/org/jboss/profiler/embedded/
   branches/JBossProfiler2/src/main/org/jboss/profiler/embedded/Profiler.java
   branches/JBossProfiler2/src/main/org/jboss/profiler/embedded/package.html
Removed:
   branches/JBossProfiler2/src/main/org/jboss/profiler/client/embedded/Profiler.java
   branches/JBossProfiler2/src/main/org/jboss/profiler/client/embedded/package.html
Modified:
   branches/JBossProfiler2/build.xml
Log:
[JBPROFILER-85] Refactor embedded package into its own top-level package

Modified: branches/JBossProfiler2/build.xml
===================================================================
--- branches/JBossProfiler2/build.xml	2009-06-24 11:02:30 UTC (rev 554)
+++ branches/JBossProfiler2/build.xml	2009-06-24 11:32:27 UTC (rev 555)
@@ -221,7 +221,7 @@
         <jar destfile="${dist.dir}/${jboss-profiler-embedded.jar}"
              basedir="${build.dir}"
              manifest="${etc.dir}/embedded-manifest.mf"
-             includes="org/jboss/profiler/agent/**,org/jboss/profiler/client/embedded/**,org/jboss/profiler/shared/**,org/jboss/logging/**,**/*.properties,**/*.xml"
+             includes="org/jboss/profiler/agent/**,org/jboss/profiler/embedded/**,org/jboss/profiler/shared/**,org/jboss/logging/**,**/*.properties,**/*.xml"
              excludes="**/*.java"/>
     </target>
 

Deleted: branches/JBossProfiler2/src/main/org/jboss/profiler/client/embedded/Profiler.java
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/client/embedded/Profiler.java	2009-06-24 11:02:30 UTC (rev 554)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/client/embedded/Profiler.java	2009-06-24 11:32:27 UTC (rev 555)
@@ -1,240 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2007-2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.profiler.client.embedded;
-
-import org.jboss.profiler.agent.Agent;
-import org.jboss.profiler.shared.Snapshot;
-import org.jboss.profiler.shared.Visibility;
-
-import java.util.List;
-
-import org.jboss.logging.Logger;
-
-/**
- * The client that will handle an embedded agent
- * @author Jesper Pedersen <jesper.pedersen at jboss.org>
- */
-public class Profiler {
-  /** The logger */
-  private static Logger log = Logger.getLogger(Profiler.class);
-
-  /**
-   * Constructor
-   */
-  private Profiler() {
-  }
-
-  /**
-   * Is the profiler enabled ?
-   * @return True if enabled; otherwise false
-   */
-  public static boolean isEnabled() {
-    return Agent.isEnabled();
-  }
-
-  /**
-   * Is the profiler running ?
-   * @return True if running; otherwise false
-   */
-  public static boolean isRunning() {
-    return org.jboss.profiler.agent.Profiler.isRunning();
-  }
-
-  /**
-   * Is the profiler using a memory store ?
-   * @return True if memory store; otherwise false
-   */
-  public static boolean isMemory() {
-    return Agent.isMemoryStore();
-  }
-
-  /**
-   * Is the profiler using a file store ?
-   * @return True if file store; otherwise false
-   */
-  public static boolean isFile() {
-    return !Agent.isMemoryStore();
-  }
-
-  /**
-   * Is EJB ?
-   * @return True if enabled; otherwise false
-   */
-  public static boolean isEJB() {
-    return Agent.isEJB();
-  }
-
-  /**
-   * Is Servlet ?
-   * @return True if enabled; otherwise false
-   */
-  public static boolean isServlet() {
-    return Agent.isServlet();
-  }
-
-  /**
-   * Is JSF ?
-   * @return True if enabled; otherwise false
-   */
-  public static boolean isJSF() {
-    return Agent.isJSF();
-  }
-
-  /**
-   * Is JMX ?
-   * @return True if enabled; otherwise false
-   */
-  public static boolean isJMX() {
-    return Agent.isJMX();
-  }
-
-  /**
-   * Is RMI ?
-   * @return True if enabled; otherwise false
-   */
-  public static boolean isRMI() {
-    return Agent.isRMI();
-  }
-
-  /**
-   * Is CORBA ?
-   * @return True if enabled; otherwise false
-   */
-  public static boolean isCORBA() {
-    return Agent.isCORBA();
-  }
-
-  /**
-   * Start the profiler
-   */
-  public static void startProfiler() {
-    org.jboss.profiler.agent.Profiler.startProfiler();
-  }
-
-  /**
-   * Stop the profiler
-   */
-  public static void stopProfiler() {
-    org.jboss.profiler.agent.Profiler.stopProfiler();
-  }
-
-  /**
-   * Take a snapshot
-   * @return The snapshot
-   */
-  public static Snapshot snapshot() {
-    return org.jboss.profiler.agent.Profiler.snapshot();
-  }
-
-  /**
-   * Get all snapshots
-   * @return The snapshots
-   */
-  public static List<Snapshot> getSnapshots() {
-    return org.jboss.profiler.agent.Profiler.getSnapshots();
-  }
-
-  /**
-   * Get a snapshot
-   * @param index The snapshot index
-   * @return The snapshot
-   */
-  public static Snapshot getSnapshot(int index) {
-    return org.jboss.profiler.agent.Profiler.getSnapshot(index);
-  }
-
-  /**
-   * List snapshots
-   * @return The snapshots
-   */
-  public static String[] listSnapshots() {
-    return org.jboss.profiler.agent.Profiler.listSnapshots();
-  }
-
-  /**
-   * Enable the profiler
-   */
-  public static void enableProfiler() {
-    Agent.setEnabled(true);
-  }
-
-  /**
-   * Disable the profiler
-   */
-  public static void disableProfiler() {
-    Agent.setEnabled(false);
-  }
-
-  /**
-   * Add classes
-   * @param classes The classes
-   * @param v The visibility
-   */
-  public static void addClasses(String classes, String v) {
-    if (v == null || v.trim().equals("")) {
-      v = "public";
-    }
-
-    Visibility vi = null;
-    if (v.equalsIgnoreCase("private")) {
-      vi = Visibility.PRIVATE;
-    } else if (v.equalsIgnoreCase("protected")) {
-      vi = Visibility.PROTECTED;
-    } else if (v.equalsIgnoreCase("package")) {
-      vi = Visibility.PACKAGE;
-    } else {
-      vi = Visibility.PUBLIC;
-    }
-
-    Agent.addClasses(classes, vi);
-  }
-
-  /**
-   * Remove classes
-   * @param classes The classes
-   */
-  public static void removeClasses(String classes) {
-    Agent.removeClasses(classes);
-  }
-
-  /**
-   * List classes
-   * @return The classes
-   */
-  public static String[] listClasses() {
-    return Agent.listClasses();
-  }
-
-  /**
-   * Clear snapshots
-   */
-  public static void clearSnapshots() {
-    org.jboss.profiler.agent.Profiler.clearSnapshots();
-  }
-
-  /**
-   * Garbage collection
-   */
-  public static void garbageCollection() {
-    org.jboss.profiler.agent.Profiler.garbageCollection();
-  }
-}

Deleted: branches/JBossProfiler2/src/main/org/jboss/profiler/client/embedded/package.html
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/client/embedded/package.html	2009-06-24 11:02:30 UTC (rev 554)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/client/embedded/package.html	2009-06-24 11:32:27 UTC (rev 555)
@@ -1,6 +0,0 @@
-<body>
-This package contains the embedded client API.
-<p>
-This API can be used when the client is run in the same VM as the agent. Note the client should be deployed
-in the same classloader as the agent.
-</body>

Copied: branches/JBossProfiler2/src/main/org/jboss/profiler/embedded/Profiler.java (from rev 554, branches/JBossProfiler2/src/main/org/jboss/profiler/client/embedded/Profiler.java)
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/embedded/Profiler.java	                        (rev 0)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/embedded/Profiler.java	2009-06-24 11:32:27 UTC (rev 555)
@@ -0,0 +1,240 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2007-2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.profiler.embedded;
+
+import org.jboss.profiler.agent.Agent;
+import org.jboss.profiler.shared.Snapshot;
+import org.jboss.profiler.shared.Visibility;
+
+import java.util.List;
+
+import org.jboss.logging.Logger;
+
+/**
+ * The client that will handle an embedded agent
+ * @author Jesper Pedersen <jesper.pedersen at jboss.org>
+ */
+public class Profiler {
+  /** The logger */
+  private static Logger log = Logger.getLogger(Profiler.class);
+
+  /**
+   * Constructor
+   */
+  private Profiler() {
+  }
+
+  /**
+   * Is the profiler enabled ?
+   * @return True if enabled; otherwise false
+   */
+  public static boolean isEnabled() {
+    return Agent.isEnabled();
+  }
+
+  /**
+   * Is the profiler running ?
+   * @return True if running; otherwise false
+   */
+  public static boolean isRunning() {
+    return org.jboss.profiler.agent.Profiler.isRunning();
+  }
+
+  /**
+   * Is the profiler using a memory store ?
+   * @return True if memory store; otherwise false
+   */
+  public static boolean isMemory() {
+    return Agent.isMemoryStore();
+  }
+
+  /**
+   * Is the profiler using a file store ?
+   * @return True if file store; otherwise false
+   */
+  public static boolean isFile() {
+    return !Agent.isMemoryStore();
+  }
+
+  /**
+   * Is EJB ?
+   * @return True if enabled; otherwise false
+   */
+  public static boolean isEJB() {
+    return Agent.isEJB();
+  }
+
+  /**
+   * Is Servlet ?
+   * @return True if enabled; otherwise false
+   */
+  public static boolean isServlet() {
+    return Agent.isServlet();
+  }
+
+  /**
+   * Is JSF ?
+   * @return True if enabled; otherwise false
+   */
+  public static boolean isJSF() {
+    return Agent.isJSF();
+  }
+
+  /**
+   * Is JMX ?
+   * @return True if enabled; otherwise false
+   */
+  public static boolean isJMX() {
+    return Agent.isJMX();
+  }
+
+  /**
+   * Is RMI ?
+   * @return True if enabled; otherwise false
+   */
+  public static boolean isRMI() {
+    return Agent.isRMI();
+  }
+
+  /**
+   * Is CORBA ?
+   * @return True if enabled; otherwise false
+   */
+  public static boolean isCORBA() {
+    return Agent.isCORBA();
+  }
+
+  /**
+   * Start the profiler
+   */
+  public static void startProfiler() {
+    org.jboss.profiler.agent.Profiler.startProfiler();
+  }
+
+  /**
+   * Stop the profiler
+   */
+  public static void stopProfiler() {
+    org.jboss.profiler.agent.Profiler.stopProfiler();
+  }
+
+  /**
+   * Take a snapshot
+   * @return The snapshot
+   */
+  public static Snapshot snapshot() {
+    return org.jboss.profiler.agent.Profiler.snapshot();
+  }
+
+  /**
+   * Get all snapshots
+   * @return The snapshots
+   */
+  public static List<Snapshot> getSnapshots() {
+    return org.jboss.profiler.agent.Profiler.getSnapshots();
+  }
+
+  /**
+   * Get a snapshot
+   * @param index The snapshot index
+   * @return The snapshot
+   */
+  public static Snapshot getSnapshot(int index) {
+    return org.jboss.profiler.agent.Profiler.getSnapshot(index);
+  }
+
+  /**
+   * List snapshots
+   * @return The snapshots
+   */
+  public static String[] listSnapshots() {
+    return org.jboss.profiler.agent.Profiler.listSnapshots();
+  }
+
+  /**
+   * Enable the profiler
+   */
+  public static void enableProfiler() {
+    Agent.setEnabled(true);
+  }
+
+  /**
+   * Disable the profiler
+   */
+  public static void disableProfiler() {
+    Agent.setEnabled(false);
+  }
+
+  /**
+   * Add classes
+   * @param classes The classes
+   * @param v The visibility
+   */
+  public static void addClasses(String classes, String v) {
+    if (v == null || v.trim().equals("")) {
+      v = "public";
+    }
+
+    Visibility vi = null;
+    if (v.equalsIgnoreCase("private")) {
+      vi = Visibility.PRIVATE;
+    } else if (v.equalsIgnoreCase("protected")) {
+      vi = Visibility.PROTECTED;
+    } else if (v.equalsIgnoreCase("package")) {
+      vi = Visibility.PACKAGE;
+    } else {
+      vi = Visibility.PUBLIC;
+    }
+
+    Agent.addClasses(classes, vi);
+  }
+
+  /**
+   * Remove classes
+   * @param classes The classes
+   */
+  public static void removeClasses(String classes) {
+    Agent.removeClasses(classes);
+  }
+
+  /**
+   * List classes
+   * @return The classes
+   */
+  public static String[] listClasses() {
+    return Agent.listClasses();
+  }
+
+  /**
+   * Clear snapshots
+   */
+  public static void clearSnapshots() {
+    org.jboss.profiler.agent.Profiler.clearSnapshots();
+  }
+
+  /**
+   * Garbage collection
+   */
+  public static void garbageCollection() {
+    org.jboss.profiler.agent.Profiler.garbageCollection();
+  }
+}


Property changes on: branches/JBossProfiler2/src/main/org/jboss/profiler/embedded/Profiler.java
___________________________________________________________________
Name: svn:mergeinfo
   + 

Copied: branches/JBossProfiler2/src/main/org/jboss/profiler/embedded/package.html (from rev 553, branches/JBossProfiler2/src/main/org/jboss/profiler/client/embedded/package.html)
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/embedded/package.html	                        (rev 0)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/embedded/package.html	2009-06-24 11:32:27 UTC (rev 555)
@@ -0,0 +1,3 @@
+<body>
+This package contains the embedded API.
+</body>


Property changes on: branches/JBossProfiler2/src/main/org/jboss/profiler/embedded/package.html
___________________________________________________________________
Name: svn:mergeinfo
   + 




More information about the jboss-cvs-commits mailing list