X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;ds=sidebyside;f=liblttng-ust-java-agent%2Fjava%2Flttng-ust-agent-common%2Forg%2Flttng%2Fust%2Fagent%2Fclient%2FILttngTcpClientListener.java;fp=liblttng-ust-java-agent%2Fjava%2Flttng-ust-agent-common%2Forg%2Flttng%2Fust%2Fagent%2Fclient%2FILttngTcpClientListener.java;h=662b998283eb33902fd6d2e6ff15d95c4571cf8b;hb=3165c2f51abe3093f4c5512b499e33cb380b387d;hp=0000000000000000000000000000000000000000;hpb=932535693bb8a719c40f63141dbfac786388ed4a;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 new file mode 100644 index 00000000..662b9982 --- /dev/null +++ b/liblttng-ust-java-agent/java/lttng-ust-agent-common/org/lttng/ust/agent/client/ILttngTcpClientListener.java @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2015 - EfficiOS Inc., Alexandre Montplaisir + * + * This library is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License, version 2.1 only, + * as published by the Free Software Foundation. + * + * This library 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 library; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +package org.lttng.ust.agent.client; + +/** + * TCP client listener interface. + * + * This interface contains callbacks that are called when the TCP client + * receives commands from the session daemon. These callbacks will define what + * do to with each command. + * + * @author Alexandre Montplaisir + */ +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. + * + * @param eventName + * The name of the event 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); + + /** + * Callback for the TCP client to notify the listener agent that a request + * for disabling an event was sent from the session daemon. + * + * @param eventName + * The name of the event that was requested to be disabled. + * @return True if the command completed successfully, false if we should + * report an error (event was not enabled, etc.) + */ + boolean eventDisabled(String eventName); + + /** + * List the all events currently enabled in the current tracing sessions. + * + * @return The list of enabled events + */ + Iterable listEnabledEvents(); +}