1 /* Copyright (C)2013 Pantheon Technologies, s.r.o. All rights reserved. */
\r
2 package org.opendaylight.openflowjava.protocol.impl.deserialization;
\r
4 import org.opendaylight.yangtools.yang.binding.DataObject;
\r
6 import io.netty.buffer.ByteBuf;
\r
9 * @author michal.polkorab
\r
11 * @param <E> message code type
\r
13 public interface OFDeserializer<E extends DataObject> {
\r
16 * Transforms byte message into POJO/DTO (of type E).
\r
17 * Assumes that input ByteBuf's readerIndex is pointing on length in OpenFlow header
\r
19 * @param rawMessage message as bytes in ByteBuf
\r
20 * @param version version of used OF Protocol
\r
21 * @return HelloMessage as DataObject
\r
23 public abstract E bufferToMessage(ByteBuf rawMessage, short version);
\r