Merge "Move adsal into its own subdirectory."
[controller.git] / opendaylight / adsal / sal / api / src / main / java / org / opendaylight / controller / sal / utils / NodeCreator.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 package org.opendaylight.controller.sal.utils;
11
12 import org.opendaylight.controller.sal.core.ConstructionException;
13 import org.opendaylight.controller.sal.core.Node;
14 import org.opendaylight.controller.sal.core.Node.NodeIDType;
15 import org.slf4j.Logger;
16 import org.slf4j.LoggerFactory;
17
18 /**
19  * Utility class for creating a Node object
20  *
21  *
22  *
23  */
24 public abstract class NodeCreator {
25     protected static final Logger logger = LoggerFactory.getLogger(NodeCreator.class);
26
27     public static Node createOFNode(Long switchId) {
28         try {
29             return new Node(NodeIDType.OPENFLOW, switchId);
30         } catch (ConstructionException e1) {
31             logger.error("",e1);
32             return null;
33         }
34     }
35 }