Squash more sonar warnings
[bgpcep.git] / framework / src / main / java / org / opendaylight / protocol / framework / ProtocolMessageFactory.java
index ffc18e4a9b5699538b7454fc43fe12b13379fe39..b24ab01774a5f0dc5c9d1df0f49df9b813cb3e27 100644 (file)
@@ -7,15 +7,18 @@
  */
 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> {
 
        /**
@@ -26,7 +29,7 @@ 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.
@@ -34,5 +37,5 @@ public interface ProtocolMessageFactory<T> {
         * @param msg message to be serialized.
         * @return byte array resulting message
         */
-       public byte[] put(final T msg);
+       byte[] put(T msg);
 }