Container Management and associated Northbound APIs.
[controller.git] / opendaylight / containermanager / it.implementation / src / main / java / org / opendaylight / controller / containermanager / internal / ContainerImpl.java
1
2 /*
3  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
4  *
5  * This program and the accompanying materials are made available under the
6  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
7  * and is available at http://www.eclipse.org/legal/epl-v10.html
8  */
9
10 /**
11  * @file   ContainerImpl.java
12  *
13  * @brief  Class that instantiated per-container implements the
14  * interface IContainer
15  *
16  *
17  */
18 package org.opendaylight.controller.containermanager.internal;
19
20 import java.util.Dictionary;
21 import org.apache.felix.dm.Component;
22 import org.opendaylight.controller.sal.core.NodeConnector;
23 import java.util.Set;
24 import org.opendaylight.controller.sal.core.Node;
25 import org.opendaylight.controller.sal.core.ContainerFlow;
26 import java.util.List;
27 import org.opendaylight.controller.sal.core.IContainer;
28
29 public class ContainerImpl implements IContainer {
30     private String containerName = null;
31
32     /**
33      * Function called by the dependency manager when all the required
34      * dependencies are satisfied
35      *
36      */
37     void init(Component c) {
38         Dictionary<?, ?> props = c.getServiceProperties();
39         if (props != null) {
40             this.containerName = (String) props.get("containerName");
41         }
42     }
43
44     @Override
45     public String getName() {
46         return this.containerName;
47     }
48
49     @Override
50     public List<ContainerFlow> getContainerFlows() {
51         return null;
52     }
53
54     @Override
55     public short getTag(Node n) {
56         return (short) 0;
57     }
58
59     @Override
60     public Set<NodeConnector> getNodeConnectors() {
61         return null;
62     }
63
64     @Override
65     public Set<Node> getNodes() {
66         return null;
67     }
68 }