Merge "Expand implementation of Neutron Service APIs in Lisp ." into develop
[lispflowmapping.git] / mappingservice / implementation / src / main / java / org / opendaylight / lispflowmapping / implementation / inventory / NodeConnectorFactory.java
1 /*
2  * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 package org.opendaylight.lispflowmapping.implementation.inventory;
10
11 import org.opendaylight.controller.sal.core.NodeConnector;
12 import org.opendaylight.controller.sal.utils.INodeConnectorFactory;
13 import org.opendaylight.controller.sal.core.Node;
14
15 public class NodeConnectorFactory implements INodeConnectorFactory
16     {
17       void init() {
18       }
19
20       /**
21        * Function called by the dependency manager when at least one dependency
22        * become unsatisfied or when the component is shutting down because for
23        * example bundle is being stopped.
24        *
25        */
26       void destroy() {
27       }
28
29       /**
30        * Function called by dependency manager after "init ()" is called and after
31        * the services provided by the class are registered in the service registry
32        *
33        */
34       void start() {
35       }
36
37       /**
38        * Function called by the dependency manager before the services exported by
39        * the component are unregistered, this will be followed by a "destroy ()"
40        * calls
41        *
42        */
43       void stop() {
44       }
45
46       public NodeConnector fromStringNoNode(String typeStr, String IDStr,
47               Node n){
48           if(typeStr.equals("LISP")){
49               try {
50                   return new NodeConnector(typeStr, IDStr, n);
51               } catch (Exception ex) {
52                   return null;
53               }
54           }
55           return null;
56       }
57 }