*/
package org.opendaylight.protocol.framework;
-import java.util.List;
/**
* Interface for factory for parsing and serializing protocol specific messages. Needs to be implemented by a protocol
* specific message factory. The methods put/parse should delegate parsing to specific message parsers, e.g.
* OpenMessageParser etc.
- *
+ *
* @param <T> type of messages created by this factory
+ *
+ * @deprecated Interact with Netty 4.0 directly, by subclassing {@link io.netty.handler.codec.ByteToMessageCodec} or
+ * similar.
*/
+@Deprecated
public interface ProtocolMessageFactory<T> {
/**
* @throws DeserializerException if some parsing error occurs
* @throws DocumentedException if some documented error occurs
*/
- public List<T> parse(final byte[] bytes) throws DeserializerException, DocumentedException;
+ T parse(byte[] bytes) throws DeserializerException, DocumentedException;
/**
* Serializes protocol specific message to byte array.
* @param msg message to be serialized.
* @return byte array resulting message
*/
- public byte[] put(final T msg);
+ byte[] put(T msg);
}