Cleanup: Add Javadoc to all public methods and members
[lttng-ust.git] / doc / examples / java-jul / Hello.java
index 87b4c1601e50c96f48ec864a95dbf1e6a286ac44..28360c721a809bc2eae8d2c4ae8d382b3e102787 100644 (file)
@@ -20,8 +20,6 @@
  * IN THE SOFTWARE.
  */
 
-import java.io.IOException;
-import java.util.logging.Level;
 import java.util.logging.Logger;
 
 /*
@@ -29,8 +27,13 @@ import java.util.logging.Logger;
  */
 import org.lttng.ust.agent.LTTngAgent;
 
-public class Hello
-{
+/**
+ * Example application using the LTTng-UST Java JUL agent.
+ *
+ * @author David Goulet
+ */
+public class Hello {
+
        /* Of course :) */
        private static final int answer = 42;
 
@@ -40,8 +43,14 @@ public class Hello
         */
        private static LTTngAgent lttngAgent;
 
-       public static void main(String args[]) throws Exception
-       {
+       /**
+        * Application start
+        *
+        * @param args
+        *            Command-line arguments
+        * @throws Exception
+        */
+       public static void main(String args[]) throws Exception {
                /*
                 * For this example, a custom "hello" logger is created. Note that JUL
                 * has a default "global" that can also be used.
@@ -49,13 +58,13 @@ public class Hello
                Logger helloLog = Logger.getLogger("hello");
 
                /*
-                * Get the LTTngAgent singelton reference. This will also initialize
+                * Get the LTTngAgent singleton reference. This will also initialize
                 * the Agent and make it register to the session daemon if available.
                 * When this returns, the Agent is registered and fully ready. If no
                 * session daemon is found, it will return and retry every 3 seconds in
                 * the background. TCP is used for communication.
                 *
-                * Note that the LTTngAgent once registered is a seperate thread in
+                * Note that the LTTngAgent once registered is a separate thread in
                 * your Java application.
                 */
                lttngAgent = LTTngAgent.getLTTngAgent();
@@ -95,7 +104,7 @@ public class Hello
 
                /*
                 * Again, this is highly recommended so the session daemon socket gets
-                * cleaned up explicitely but it is not mandatory to do this step.
+                * cleaned up explicitly but it is not mandatory to do this step.
                 */
                lttngAgent.dispose();
        }
This page took 0.02347 seconds and 4 git commands to generate.