public class BGPMessageParserMock extends Object implements MessageRegistry
MessageRegistry. It implements the required interface by having two internal maps,
each used in one of the methods. It looks up the key provided to the method and returns whatever value is stored in
the map.| Constructor and Description |
|---|
BGPMessageParserMock(Map<io.netty.buffer.ByteBuf,org.opendaylight.yangtools.yang.binding.Notification> messages)
Creates a new BGPMessageParserMock with given messages.
|
| Modifier and Type | Method and Description |
|---|---|
org.opendaylight.yangtools.yang.binding.Notification |
parseMessage(io.netty.buffer.ByteBuf buffer) |
org.opendaylight.yangtools.yang.binding.Notification |
parseMessage(io.netty.buffer.ByteBuf bytes,
PeerSpecificParserConstraint constraint)
Decode input buffer to BGP Message.
|
void |
serializeMessage(org.opendaylight.yangtools.yang.binding.Notification msg,
io.netty.buffer.ByteBuf buffer)
Encode input BGP Message to output buffer.
|
public BGPMessageParserMock(Map<io.netty.buffer.ByteBuf,org.opendaylight.yangtools.yang.binding.Notification> messages)
messages - represents a new map of ByteBuf and Notificationpublic org.opendaylight.yangtools.yang.binding.Notification parseMessage(io.netty.buffer.ByteBuf buffer)
throws BGPParsingException,
BGPDocumentedException
parseMessage in interface MessageRegistryBGPParsingExceptionBGPDocumentedExceptionpublic void serializeMessage(org.opendaylight.yangtools.yang.binding.Notification msg,
io.netty.buffer.ByteBuf buffer)
MessageRegistryserializeMessage in interface MessageRegistrymsg - Input BGP Message to be serialized.buffer - Output buffer where message is to be written.public org.opendaylight.yangtools.yang.binding.Notification parseMessage(io.netty.buffer.ByteBuf bytes,
PeerSpecificParserConstraint constraint)
throws BGPDocumentedException,
BGPParsingException
MessageRegistryparseMessage in interface MessageRegistrybytes - Input buffer with encoded message.constraint - Peer specific constraint.BGPDocumentedExceptionBGPParsingExceptionCopyright © 2018 OpenDaylight. All rights reserved.