Merge "Remove "response" from yang."
[packetcable.git] / protocol_plugins.packetcable / src / main / java / org / opendaylight / controller / protocol_plugin / packetcable / internal / PCNodeConnectorFactory.java
1 /*
2  @header@
3  */
4
5 package org.opendaylight.controller.protocol_plugin.packetcable.internal;
6
7 import org.opendaylight.controller.sal.core.NodeConnector;
8 import org.opendaylight.controller.sal.utils.INodeConnectorFactory;
9 import org.opendaylight.controller.sal.core.Node;
10
11 public class PCNodeConnectorFactory implements INodeConnectorFactory
12     {
13       void init() {
14       }
15
16       /**
17        * Function called by the dependency manager when at least one dependency
18        * become unsatisfied or when the component is shutting down because for
19        * example bundle is being stopped.
20        *
21        */
22       void destroy() {
23       }
24
25       /**
26        * Function called by dependency manager after "init ()" is called and after
27        * the services provided by the class are registered in the service registry
28        *
29        */
30       void start() {
31       }
32
33       /**
34        * Function called by the dependency manager before the services exported by
35        * the component are unregistered, this will be followed by a "destroy ()"
36        * calls
37        *
38        */
39       void stop() {
40       }
41
42       public NodeConnector fromStringNoNode(String typeStr, String IDStr,
43               Node n){
44           if(typeStr.equals("PC")){
45               try {
46                   return new NodeConnector(typeStr, Integer.parseInt(IDStr), n);
47               } catch (Exception ex) {
48                   return null;
49               }
50           }
51           return null;
52       }
53 }