Split the JNI APIs in separate classes
[lttng-ust.git] / liblttng-ust-java-agent / java / lttng-ust-agent-common / org / lttng / ust / agent / client / ISessiondCommand.java
index 855ea9da8aeadcf72bac126a2453cde7222f96fb..c1faa15f1a74e6b25cdf92b95531eb9af92acc21 100644 (file)
 
 package org.lttng.ust.agent.client;
 
+/**
+ * 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 +40,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 LttngAgentResponse execute(ILttngTcpClientListener agent);
 }
\ No newline at end of file
This page took 0.024448 seconds and 4 git commands to generate.