X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fprotocol_plugins%2Fstub%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fprotocol_plugins%2Fstub%2Finternal%2FStubNodeConnectorFactory.java;fp=opendaylight%2Fprotocol_plugins%2Fstub%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fprotocol_plugins%2Fstub%2Finternal%2FStubNodeConnectorFactory.java;h=0c1963d93396aa9be2bea92600e55f58fde2ed6d;hb=46a70492ef6227caa6a4494e1ca9a209e5e1d449;hp=0000000000000000000000000000000000000000;hpb=63680b9ec12d28383e544cdfc3af0599419d19d4;p=controller.git diff --git a/opendaylight/protocol_plugins/stub/src/main/java/org/opendaylight/controller/protocol_plugins/stub/internal/StubNodeConnectorFactory.java b/opendaylight/protocol_plugins/stub/src/main/java/org/opendaylight/controller/protocol_plugins/stub/internal/StubNodeConnectorFactory.java new file mode 100644 index 0000000000..0c1963d933 --- /dev/null +++ b/opendaylight/protocol_plugins/stub/src/main/java/org/opendaylight/controller/protocol_plugins/stub/internal/StubNodeConnectorFactory.java @@ -0,0 +1,49 @@ +package org.opendaylight.controller.protocol_plugins.stub.internal; + +import org.opendaylight.controller.sal.core.NodeConnector; +import org.opendaylight.controller.sal.utils.INodeConnectorFactory; +import org.opendaylight.controller.sal.core.Node; + +public class StubNodeConnectorFactory implements INodeConnectorFactory + { + void init() { + } + + /** + * Function called by the dependency manager when at least one dependency + * become unsatisfied or when the component is shutting down because for + * example bundle is being stopped. + * + */ + void destroy() { + } + + /** + * Function called by dependency manager after "init ()" is called and after + * the services provided by the class are registered in the service registry + * + */ + void start() { + } + + /** + * Function called by the dependency manager before the services exported by + * the component are unregistered, this will be followed by a "destroy ()" + * calls + * + */ + void stop() { + } + + public NodeConnector fromStringNoNode(String typeStr, String IDStr, + Node n){ + if(typeStr.equals("STUB")){ + try { + return new NodeConnector(typeStr, Integer.parseInt(IDStr), n); + } catch (Exception ex) { + return null; + } + } + return null; + } +}