X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=liblttng-ust-java-agent%2Fjava%2Flttng-ust-agent-common%2Forg%2Flttng%2Fust%2Fagent%2FLTTngAgent.java;fp=liblttng-ust-java-agent%2Fjava%2Flttng-ust-agent-common%2Forg%2Flttng%2Fust%2Fagent%2FLTTngAgent.java;h=e83504d94d8f3f26072cca3b0765da8182597850;hb=5bfeaeca7fd73ebdc5aa9f555213055272daab29;hp=ca7bc777fa24b1042acf3d41bbd27fcc4e73a547;hpb=8685da113a6ed01601be9b7db4fb4a1f4b72166d;p=lttng-ust.git diff --git a/liblttng-ust-java-agent/java/lttng-ust-agent-common/org/lttng/ust/agent/LTTngAgent.java b/liblttng-ust-java-agent/java/lttng-ust-agent-common/org/lttng/ust/agent/LTTngAgent.java index ca7bc777..e83504d9 100644 --- a/liblttng-ust-java-agent/java/lttng-ust-agent-common/org/lttng/ust/agent/LTTngAgent.java +++ b/liblttng-ust-java-agent/java/lttng-ust-agent-common/org/lttng/ust/agent/LTTngAgent.java @@ -22,6 +22,11 @@ import java.lang.reflect.InvocationTargetException; import java.util.concurrent.Semaphore; import java.util.concurrent.TimeUnit; +/** + * The central agent managing the JUL and Log4j handlers. + * + * @author David Goulet + */ public class LTTngAgent { /* Domains */ @@ -181,8 +186,11 @@ public class LTTngAgent { } } - /* + /** * Public getter to acquire a reference to this singleton object. + * + * @return The agent instance + * @throws IOException */ public static synchronized LTTngAgent getLTTngAgent() throws IOException { if (curAgent == null) { @@ -273,8 +281,11 @@ public class LTTngAgent { return numThreads; } - - public void dispose() throws IOException { + /** + * Dispose the agent. Applications should call this once they are done + * logging. + */ + public void dispose() { if (this.useJUL) { julUserClient.destroy(); julRootClient.destroy();