Add methods that allows registering any serializer
[openflowjava.git] / openflow-protocol-api / src / main / java / org / opendaylight / openflowjava / protocol / api / extensibility / HeaderSerializer.java
index 3392f8175cd4a7964dcc2db9c9c0ce368df0b764..427d84ce29b15291d46104d74b6d7d6bcd40841b 100644 (file)
@@ -1,27 +1,26 @@
-/*\r
- * Copyright (c) 2013 Pantheon Technologies s.r.o. and others.  All rights reserved.\r
- *\r
- * This program and the accompanying materials are made available under the\r
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
- * and is available at http://www.eclipse.org/legal/epl-v10.html\r
- */\r
-package org.opendaylight.openflowjava.protocol.api.extensibility;\r
-\r
-import org.opendaylight.yangtools.yang.binding.DataObject;\r
-\r
-import io.netty.buffer.ByteBuf;\r
-\r
-/**\r
- * Does only-header serialization (such as oxm_ids, action_ids, instruction_ids)\r
- * @author michal.polkorab\r
- * @param <SERIALIZER_TYPE>\r
- */\r
-public interface HeaderSerializer<SERIALIZER_TYPE extends DataObject> extends OFGeneralSerializer {\r
-\r
-    /**\r
-     * Serializes object headers (e.g. for Multipart message - Table Features)\r
-     * @param input object whose headers should be serialized\r
-     * @param outBuffer output buffer\r
-     */\r
-    public void serializeHeader(SERIALIZER_TYPE input, ByteBuf outBuffer);\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.api.extensibility;
+
+import io.netty.buffer.ByteBuf;
+import org.opendaylight.yangtools.yang.binding.DataContainer;
+
+/**
+ * Does only-header serialization (such as oxm_ids, action_ids, instruction_ids)
+ * @author michal.polkorab
+ * @param <T> input message type
+ */
+public interface HeaderSerializer<T extends DataContainer> extends OFGeneralSerializer {
+
+    /**
+     * Serializes object headers (e.g. for Multipart message - Table Features)
+     * @param input object whose headers should be serialized
+     * @param outBuffer output buffer
+     */
+    void serializeHeader(T input, ByteBuf outBuffer);
+}