Fix raw type warnings in bgp/bmp
[bgpcep.git] / bgp / parser-spi / src / main / java / org / opendaylight / protocol / bgp / parser / spi / MessageRegistry.java
index 3ee9f5f763278abf7636b3da48fea0e99a89542d..84088ce2388e04139b9032ff747a761b1b3abb55 100644 (file)
@@ -8,33 +8,24 @@
 package org.opendaylight.protocol.bgp.parser.spi;
 
 import io.netty.buffer.ByteBuf;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
+import org.eclipse.jdt.annotation.NonNullByDefault;
+import org.eclipse.jdt.annotation.Nullable;
 import org.opendaylight.protocol.bgp.parser.BGPDocumentedException;
 import org.opendaylight.protocol.bgp.parser.BGPParsingException;
 import org.opendaylight.yangtools.yang.binding.Notification;
 
 /**
- * BGP Message codec registry, provides services
- * to encode/decode messages.
+ * BGP Message codec registry, provides services to encode/decode messages.
  */
+@NonNullByDefault
 public interface MessageRegistry {
-
-    /**
-     * @deprecated Use {@link #parseMessage(ByteBuf, PeerSpecificParserConstraint)}
-     */
-    @Deprecated
-    Notification parseMessage(ByteBuf bytes) throws BGPDocumentedException, BGPParsingException;
-
     /**
      * Decode input buffer to BGP Message.
      * @param bytes Input buffer with encoded message.
      * @param constraint Peer specific constraint.
      * @return Parsed BGP message.
-     * @throws BGPDocumentedException
-     * @throws BGPParsingException
      */
-    @Nonnull Notification parseMessage(@Nonnull ByteBuf bytes, @Nullable PeerSpecificParserConstraint constraint)
+    Notification<?> parseMessage(ByteBuf bytes, @Nullable PeerSpecificParserConstraint constraint)
             throws BGPDocumentedException, BGPParsingException;
 
     /**
@@ -42,6 +33,5 @@ public interface MessageRegistry {
      * @param message Input BGP Message to be serialized.
      * @param buffer Output buffer where message is to be written.
      */
-    void serializeMessage(@Nonnull Notification message, @Nonnull ByteBuf buffer);
-
+    void serializeMessage(Notification<?> message, ByteBuf buffer);
 }