X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=liblttng-ust-java-agent%2Fjava%2Flttng-ust-agent-common%2Forg%2Flttng%2Fust%2Fagent%2Fclient%2FISessiondCommand.java;h=0b5a164433f075542942427016158b5d8eea77be;hb=301a3ddb302c9c2767f41f3b47d2f3e8ca8b9067;hp=855ea9da8aeadcf72bac126a2453cde7222f96fb;hpb=8286ff50af5ad0b39d191e8f89071a3de7ccbdfa;p=lttng-ust.git diff --git a/liblttng-ust-java-agent/java/lttng-ust-agent-common/org/lttng/ust/agent/client/ISessiondCommand.java b/liblttng-ust-java-agent/java/lttng-ust-agent-common/org/lttng/ust/agent/client/ISessiondCommand.java index 855ea9da..0b5a1644 100644 --- a/liblttng-ust-java-agent/java/lttng-ust-agent-common/org/lttng/ust/agent/client/ISessiondCommand.java +++ b/liblttng-ust-java-agent/java/lttng-ust-agent-common/org/lttng/ust/agent/client/ISessiondCommand.java @@ -18,9 +18,18 @@ package org.lttng.ust.agent.client; +import org.lttng.ust.agent.AbstractLttngAgent; + +/** + * Interface to represent all commands sent from the session daemon to the Java + * agent. The agent is then expected to execute the command and provide a + * response. + * + * @author Alexandre Montplaisir + */ interface ISessiondCommand { - enum LttngAgentCommand { + enum CommandType { /** List logger(s). */ CMD_LIST(1), @@ -33,20 +42,21 @@ interface ISessiondCommand { private int code; - private LttngAgentCommand(int c) { + private CommandType(int c) { code = c; } - public int getCommand() { + public int getCommandType() { return code; } } /** - * Populate the class from a byte array + * Execute the command handler's action on the specified tracing agent. * - * @param data - * the byte array containing the streamed command + * @param agent + * The agent on which to execute the command + * @return If the command completed successfully or not */ - void populate(byte[] data); + public ILttngAgentResponse execute(AbstractLttngAgent agent); } \ No newline at end of file