Copyright update
[openflowjava.git] / openflow-protocol-impl / src / main / java / org / opendaylight / openflowjava / protocol / impl / deserialization / DeserializationFactory.java
index a6b9b8f76a3a80f1dee346cdec9557b77e8e1a81..4daadffc7a42af656bc20af8fa14428487df81ef 100644 (file)
@@ -1,40 +1,47 @@
-/* Copyright (C)2013 Pantheon Technologies, s.r.o. All rights reserved. */\r
-package org.opendaylight.openflowjava.protocol.impl.deserialization;\r
-\r
-import io.netty.buffer.ByteBuf;\r
-\r
-import org.opendaylight.openflowjava.protocol.impl.util.EncodeConstants;\r
-import org.opendaylight.yangtools.yang.binding.DataObject;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-/**\r
- * @author michal.polkorab\r
- * @author timotej.kubas\r
- */\r
-public abstract class DeserializationFactory {\r
-    \r
-    private static final Logger LOGGER = LoggerFactory\r
-            .getLogger(DeserializationFactory.class);\r
-\r
-    /**\r
-     * Transforms ByteBuf into correct POJO message\r
-     * @param rawMessage \r
-     * @param version version decoded from OpenFlow protocol message\r
-     * @return correct POJO as DataObject\r
-     */\r
-    public static DataObject bufferToMessage(ByteBuf rawMessage, short version) {\r
-        DataObject dataObject = null;\r
-        short type = rawMessage.readUnsignedByte();\r
-        rawMessage.skipBytes(EncodeConstants.SIZE_OF_SHORT_IN_BYTES);\r
-\r
-        MessageTypeCodeKey msgTypeCodeKey = new MessageTypeCodeKey(version, type);\r
-        OFDeserializer<?> decoder = DecoderTable.getInstance().getDecoder(msgTypeCodeKey);\r
-        if (decoder != null) {\r
-            dataObject = decoder.bufferToMessage(rawMessage, version);\r
-        } else {\r
-            LOGGER.warn("No correct decoder found in DecoderTable for arguments: " + msgTypeCodeKey.toString());\r
-        }\r
-        return dataObject;\r
-    }\r
-}\r
+/*
+ * Copyright (c) 2013 Pantheon Technologies s.r.o. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+package org.opendaylight.openflowjava.protocol.impl.deserialization;
+
+import io.netty.buffer.ByteBuf;
+
+import org.opendaylight.openflowjava.protocol.impl.util.EncodeConstants;
+import org.opendaylight.yangtools.yang.binding.DataObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author michal.polkorab
+ * @author timotej.kubas
+ */
+public abstract class DeserializationFactory {
+    
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(DeserializationFactory.class);
+
+    /**
+     * Transforms ByteBuf into correct POJO message
+     * @param rawMessage 
+     * @param version version decoded from OpenFlow protocol message
+     * @return correct POJO as DataObject
+     */
+    public static DataObject bufferToMessage(ByteBuf rawMessage, short version) {
+        DataObject dataObject = null;
+        short type = rawMessage.readUnsignedByte();
+        rawMessage.skipBytes(EncodeConstants.SIZE_OF_SHORT_IN_BYTES);
+
+        MessageTypeCodeKey msgTypeCodeKey = new MessageTypeCodeKey(version, type);
+        OFDeserializer<?> decoder = DecoderTable.getInstance().getDecoder(msgTypeCodeKey);
+        if (decoder != null) {
+            dataObject = decoder.bufferToMessage(rawMessage, version);
+        } else {
+            LOGGER.warn("No correct decoder found in DecoderTable for arguments: " + msgTypeCodeKey.toString());
+        }
+        return dataObject;
+    }
+}