Madan Jampani

Initialize NettyMessagingService explicitly as it is not a OSGi service yet

...@@ -30,6 +30,7 @@ import org.onlab.netty.Endpoint; ...@@ -30,6 +30,7 @@ import org.onlab.netty.Endpoint;
30 import org.onlab.netty.Message; 30 import org.onlab.netty.Message;
31 import org.onlab.netty.MessageHandler; 31 import org.onlab.netty.MessageHandler;
32 import org.onlab.netty.MessagingService; 32 import org.onlab.netty.MessagingService;
33 +import org.onlab.netty.NettyMessagingService;
33 import org.slf4j.Logger; 34 import org.slf4j.Logger;
34 import org.slf4j.LoggerFactory; 35 import org.slf4j.LoggerFactory;
35 36
...@@ -48,7 +49,6 @@ public class ClusterCommunicationManager ...@@ -48,7 +49,6 @@ public class ClusterCommunicationManager
48 public static final long HEART_BEAT_INTERVAL_MILLIS = 1000L; 49 public static final long HEART_BEAT_INTERVAL_MILLIS = 1000L;
49 50
50 // TODO: This probably should not be a OSGi service. 51 // TODO: This probably should not be a OSGi service.
51 - //@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
52 private MessagingService messagingService; 52 private MessagingService messagingService;
53 53
54 private static final KryoSerializer SERIALIZER = new KryoSerializer() { 54 private static final KryoSerializer SERIALIZER = new KryoSerializer() {
...@@ -65,11 +65,7 @@ public class ClusterCommunicationManager ...@@ -65,11 +65,7 @@ public class ClusterCommunicationManager
65 65
66 @Activate 66 @Activate
67 public void activate() { 67 public void activate() {
68 - // TODO: initialize messagingService 68 + messagingService = new NettyMessagingService(localNode.tcpPort());
69 - // TODO: setPayloadSerializer, which is capable of
70 - // (1) serialize ClusterMessage - ClusterMessage.payload
71 - // (2) serialize ClusterMessage.payload using user specified serializer
72 -// messagingService.setPayloadSerializer(...);
73 log.info("Started"); 69 log.info("Started");
74 } 70 }
75 71
......