changeset 2176:4bae3753a33d ipc

Remove some unneeded TODOs and some debugging code.
author Elliott Baron <ebaron@redhat.com>
date Tue, 09 Feb 2016 15:39:47 -0500
parents be18f6865501
children d110392b1d88
files agent/ipc/server/src/main/java/com/redhat/thermostat/agent/ipc/server/AgentIPCService.java agent/ipc/server/src/main/java/com/redhat/thermostat/agent/ipc/server/ThermostatIPCCallbacks.java agent/ipc/unix-socket/common/src/main/java/com/redhat/thermostat/agent/ipc/unixsocket/common/internal/ThermostatLocalSocketChannelImpl.java dev/ipc-socket-test/test-client/src/main/java/com/redhat/thermostat/dev/ipc/test/client/internal/UnixSocketTestClient.java dev/ipc-socket-test/test-server/src/main/java/com/redhat/thermostat/dev/ipc/test/server/internal/Activator.java
diffstat 5 files changed, 4 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/agent/ipc/server/src/main/java/com/redhat/thermostat/agent/ipc/server/AgentIPCService.java	Tue Feb 09 15:31:40 2016 -0500
+++ b/agent/ipc/server/src/main/java/com/redhat/thermostat/agent/ipc/server/AgentIPCService.java	Tue Feb 09 15:39:47 2016 -0500
@@ -57,7 +57,7 @@
      * @param callbacks - Object to be notified when data is received, must not be null
      * @throws IOException if this IPC server cannot be created for any reason
      */
-    void createServer(String name, ThermostatIPCCallbacks callbacks) throws IOException; // TODO Make async optional?
+    void createServer(String name, ThermostatIPCCallbacks callbacks) throws IOException;
     
     /**
      * Check if an IPC server exists with a given name.
--- a/agent/ipc/server/src/main/java/com/redhat/thermostat/agent/ipc/server/ThermostatIPCCallbacks.java	Tue Feb 09 15:31:40 2016 -0500
+++ b/agent/ipc/server/src/main/java/com/redhat/thermostat/agent/ipc/server/ThermostatIPCCallbacks.java	Tue Feb 09 15:39:47 2016 -0500
@@ -52,6 +52,6 @@
      * @param data - input received by the IPC server from an IPC client, will not be null
      * @return a response to send back to the IPC client, may be null
      */
-    byte[] dataReceived(byte[] data); // TODO Maybe change from byte[] to type with more context?
+    byte[] dataReceived(byte[] data);
 
 }
--- a/agent/ipc/unix-socket/common/src/main/java/com/redhat/thermostat/agent/ipc/unixsocket/common/internal/ThermostatLocalSocketChannelImpl.java	Tue Feb 09 15:31:40 2016 -0500
+++ b/agent/ipc/unix-socket/common/src/main/java/com/redhat/thermostat/agent/ipc/unixsocket/common/internal/ThermostatLocalSocketChannelImpl.java	Tue Feb 09 15:39:47 2016 -0500
@@ -52,10 +52,8 @@
     // If true, dumps header information for each header read/written
     private static final boolean DEBUG_HEADER = false;
     // Maximum size of message (excluding header) in bytes
-    // FIXME Increase this back up to a reasonable amount
     // TODO Make configurable
-    //private static final int DEFAULT_MAX_MESSAGE_SIZE = 8092;
-    private static final int DEFAULT_MAX_MESSAGE_SIZE = 5; // Force multipart messages
+    private static final int DEFAULT_MAX_MESSAGE_SIZE = 8092;
     // End of stream indicated by -1 from read
     private static final int EOF = -1;
     
--- a/dev/ipc-socket-test/test-client/src/main/java/com/redhat/thermostat/dev/ipc/test/client/internal/UnixSocketTestClient.java	Tue Feb 09 15:31:40 2016 -0500
+++ b/dev/ipc-socket-test/test-client/src/main/java/com/redhat/thermostat/dev/ipc/test/client/internal/UnixSocketTestClient.java	Tue Feb 09 15:39:47 2016 -0500
@@ -145,7 +145,7 @@
             String receivedMsg = charBuf.toString();
             System.out.println("Client received message: \"" + receivedMsg + "\"");
             
-            // XXX For testing only
+            // Verify against what we expected
             DummyReceiver dummy = new DummyReceiver();
             String expected = dummy.answer(question);
             if (!expected.equals(receivedMsg)) {
--- a/dev/ipc-socket-test/test-server/src/main/java/com/redhat/thermostat/dev/ipc/test/server/internal/Activator.java	Tue Feb 09 15:31:40 2016 -0500
+++ b/dev/ipc-socket-test/test-server/src/main/java/com/redhat/thermostat/dev/ipc/test/server/internal/Activator.java	Tue Feb 09 15:39:47 2016 -0500
@@ -38,7 +38,6 @@
 
 import java.io.IOException;
 import java.util.Map;
-import java.util.logging.Level;
 
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleActivator;
@@ -48,7 +47,6 @@
 import com.redhat.thermostat.agent.ipc.server.AgentIPCService;
 import com.redhat.thermostat.common.MultipleServiceTracker;
 import com.redhat.thermostat.common.MultipleServiceTracker.Action;
-import com.redhat.thermostat.common.utils.LoggingUtils;
 import com.redhat.thermostat.shared.config.CommonPaths;
 
 public class Activator implements BundleActivator {
@@ -59,8 +57,6 @@
     
     @Override
     public void start(final BundleContext ctx) throws Exception {
-        // XXX
-        LoggingUtils.setGlobalLogLevel(Level.WARNING);
         Class<?>[] deps = { CommonPaths.class, AgentIPCService.class };
         tracker = new MultipleServiceTracker(ctx, deps, new Action() {