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;
/**
* @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);
}