Bug 5596 Created lifecycle service
[openflowplugin.git] / openflowplugin-impl / src / main / java / org / opendaylight / openflowplugin / impl / connection / ConnectionContextImpl.java
index d81d47a80dd1e8286ed80e423222972824621e0e..aebb3fe3d3221034a1291f9f1c7688aedf0d6657 100644 (file)
@@ -17,6 +17,7 @@ import java.util.concurrent.Executors;
 import java.util.concurrent.Future;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
+import org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifier;
 import org.opendaylight.openflowjava.protocol.api.connection.ConnectionAdapter;
 import org.opendaylight.openflowjava.protocol.api.connection.OutboundQueue;
 import org.opendaylight.openflowjava.protocol.api.connection.OutboundQueueHandlerRegistration;
@@ -249,6 +250,7 @@ public class ConnectionContextImpl implements ConnectionContext {
         final private KeyedInstanceIdentifier<Node, NodeKey> nodeII;
         final private Short version;
         final private BigInteger datapathId;
+        final private ServiceGroupIdentifier serviceGroupIdentifier;
 
         DeviceInfoImpl(
                 final NodeId nodeId,
@@ -259,6 +261,7 @@ public class ConnectionContextImpl implements ConnectionContext {
             this.nodeII = nodeII;
             this.version = version;
             this.datapathId = datapathId;
+            this.serviceGroupIdentifier = ServiceGroupIdentifier.create(this.nodeId.getValue());
         }
 
         @Override
@@ -281,6 +284,11 @@ public class ConnectionContextImpl implements ConnectionContext {
             return datapathId;
         }
 
+        @Override
+        public ServiceGroupIdentifier getServiceIdentifier() {
+            return this.serviceGroupIdentifier;
+        }
+
         @Override
         public boolean equals(Object o) {
             if (this == o) {