1 package org.onosproject.store.cluster.messaging.impl;
3 import org.apache.felix.scr.annotations.Activate;
4 import org.apache.felix.scr.annotations.Component;
5 import org.apache.felix.scr.annotations.Deactivate;
6 import org.apache.felix.scr.annotations.Reference;
7 import org.apache.felix.scr.annotations.ReferenceCardinality;
8 import org.apache.felix.scr.annotations.Service;
9 import org.onlab.nio.service.IOLoopMessaging;
10 import org.onosproject.cluster.ClusterDefinitionService;
11 import org.onosproject.cluster.ControllerNode;
12 import org.onosproject.store.cluster.messaging.Endpoint;
13 import org.slf4j.Logger;
14 import org.slf4j.LoggerFactory;
17 * IOLoop based MessagingService.
19 @Component(immediate = true, enabled = false)
21 public class IOLoopMessagingManager extends IOLoopMessaging {
23 private final Logger log = LoggerFactory.getLogger(getClass());
25 @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
26 protected ClusterDefinitionService clusterDefinitionService;
29 public void activate() throws Exception {
30 ControllerNode localNode = clusterDefinitionService.localNode();
31 super.start(new Endpoint(localNode.ip(), localNode.tcpPort()));
36 public void deactivate() throws Exception {