import org.opendaylight.controller.sal.core.NodeConnector;
import org.opendaylight.controller.sal.core.Node.NodeIDType;
import org.opendaylight.controller.sal.core.NodeConnector.NodeConnectorIDType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* The class provides helper functions to create a node connector
*
*/
public abstract class NodeConnectorCreator {
+ protected static final Logger logger = LoggerFactory
+ .getLogger(NodeConnectorCreator.class);
/**
* Generic NodeConnector creator
* The nodeConnector type is inferred from the node type
return new NodeConnector(NodeConnectorIDType.OPENFLOW,
(Short) portId, node);
} catch (ConstructionException e1) {
- e1.printStackTrace();
+ logger.error("",e1);
return null;
}
}
try {
return new NodeConnector(nodeConnectorType, portId, node);
} catch (ConstructionException e1) {
- e1.printStackTrace();
+ logger.error("",e1);
return null;
}
}
try {
return new NodeConnector(NodeConnectorIDType.OPENFLOW, portId, node);
} catch (ConstructionException e1) {
- e1.printStackTrace();
+ logger.error("",e1);
return null;
}
}
}
return nodeConnectors;
} catch (ConstructionException e1) {
- e1.printStackTrace();
+ logger.error("",e1);
return null;
}
}