X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=liblttng-ust-java-agent%2Fjava%2Flttng-ust-agent-common%2Forg%2Flttng%2Fust%2Fagent%2Fclient%2FILttngTcpClientListener.java;h=21189730befb9bb353d68740fc0b5248011defce;hb=6e1fdc3a9e5e6231c8edc87b35eb9babdc4b69bb;hp=662b998283eb33902fd6d2e6ff15d95c4571cf8b;hpb=3165c2f51abe3093f4c5512b499e33cb380b387d;p=lttng-ust.git diff --git a/liblttng-ust-java-agent/java/lttng-ust-agent-common/org/lttng/ust/agent/client/ILttngTcpClientListener.java b/liblttng-ust-java-agent/java/lttng-ust-agent-common/org/lttng/ust/agent/client/ILttngTcpClientListener.java index 662b9982..21189730 100644 --- a/liblttng-ust-java-agent/java/lttng-ust-agent-common/org/lttng/ust/agent/client/ILttngTcpClientListener.java +++ b/liblttng-ust-java-agent/java/lttng-ust-agent-common/org/lttng/ust/agent/client/ILttngTcpClientListener.java @@ -17,6 +17,10 @@ package org.lttng.ust.agent.client; +import java.util.Collection; + +import org.lttng.ust.agent.session.EventRule; + /** * TCP client listener interface. * @@ -30,14 +34,14 @@ public interface ILttngTcpClientListener { /** * Callback for the TCP client to notify the listener agent that a request - * for enabling an event was sent from the session daemon. + * for enabling an event rule was sent from the session daemon. * - * @param eventName - * The name of the event that was requested to be enabled. + * @param eventRule + * The event rule that was requested to be enabled * @return Since we do not track individual sessions, right now this command * cannot fail. It will always return true. */ - boolean eventEnabled(String eventName); + boolean eventEnabled(EventRule eventRule); /** * Callback for the TCP client to notify the listener agent that a request @@ -51,9 +55,42 @@ public interface ILttngTcpClientListener { boolean eventDisabled(String eventName); /** - * List the all events currently enabled in the current tracing sessions. + * Callback for the TCP client to notify the listener agent that a request + * for enabling an application-specific context was sent from the session + * daemon. + * + * @param contextRetrieverName + * The name of the retriever in which the context is present. + * This is used to namespace the contexts. + * @param contextName + * The name of the context that was requested to be enabled + * @return Since we do not track individual sessions, right now this command + * cannot fail. It will always return true. + */ + boolean appContextEnabled(String contextRetrieverName, String contextName); + + /** + * Callback for the TCP client to notify the listener agent that a request + * for disabling an application-specific context was sent from the session + * daemon. + * + * @param contextRetrieverName + * The name of the retriever in which the context is present. + * This is used to namespace the contexts. + * @param contextName + * The name of the context that was requested to be disabled. + * @return True if the command completed successfully, false if we should + * report an error (context was not previously enabled for example) + */ + boolean appContextDisabled(String contextRetrieverName, String contextName); + + /** + * List the events that are available in the agent's tracing domain. + * + * In Java terms, this means loggers that have at least one LTTng log + * handler of their corresponding domain attached. * - * @return The list of enabled events + * @return The list of available events */ - Iterable listEnabledEvents(); + Collection listAvailableEvents(); }