Introduce a new client listener interface for the Java agent
[lttng-ust.git] / liblttng-ust-java-agent / java / lttng-ust-agent-common / org / lttng / ust / agent / client / SessiondListLoggersCommand.java
index cb20ea90b499d5e2a3dd3c1347d8ae558cf01b49..c06eaaad95e09db12565d841a7b75c88ada37194 100644 (file)
@@ -23,8 +23,6 @@ import java.nio.ByteOrder;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.lttng.ust.agent.AbstractLttngAgent;
-
 /**
  * Session daemon command asking the Java agent to list its registered loggers,
  * which corresponds to event names in the tracing session.
@@ -35,7 +33,7 @@ import org.lttng.ust.agent.AbstractLttngAgent;
 class SessiondListLoggersCommand implements ISessiondCommand {
 
        @Override
-       public ILttngAgentResponse execute(AbstractLttngAgent<?> agent) {
+       public LttngAgentResponse execute(ILttngTcpClientListener agent) {
                final List<String> loggerList = new ArrayList<String>();
                int dataSize = 0;
 
@@ -47,7 +45,7 @@ class SessiondListLoggersCommand implements ISessiondCommand {
                return new SessiondListLoggersResponse(loggerList, dataSize);
        }
 
-       private static class SessiondListLoggersResponse implements ILttngAgentResponse {
+       private static class SessiondListLoggersResponse extends LttngAgentResponse {
 
                private final static int SIZE = 12;
 
@@ -62,7 +60,7 @@ class SessiondListLoggersCommand implements ISessiondCommand {
                @Override
                public ReturnCode getReturnCode() {
                        /* This command can't really fail */
-                       return ILttngAgentResponse.SUCESS_RESPONSE.getReturnCode();
+                       return ReturnCode.CODE_SUCCESS_CMD;
                }
 
                @Override
This page took 0.024081 seconds and 4 git commands to generate.