Search in sources :

Example 1 with XtrReplyMappingBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.XtrReplyMappingBuilder in project lispflowmapping by opendaylight.

the class LispXtrSouthboundHandler method handleMapReply.

@SuppressWarnings("checkstyle:IllegalCatch")
private void handleMapReply(ByteBuffer buffer) {
    try {
        MapReply reply = MapReplySerializer.getInstance().deserialize(buffer);
        XtrReplyMappingBuilder replyMappingBuilder = new XtrReplyMappingBuilder();
        replyMappingBuilder.setMapReply(LispNotificationHelper.convertMapReply(reply));
        lispSbPlugin.sendNotificationIfPossible(replyMappingBuilder.build());
    } catch (RuntimeException re) {
        throw new LispMalformedPacketException("Couldn't deserialize Map-Reply (len=" + buffer.capacity() + ")", re);
    } catch (InterruptedException e) {
        LOG.warn("Notification publication interrupted!");
    }
}
Also used : MapReply(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.MapReply) LispMalformedPacketException(org.opendaylight.lispflowmapping.southbound.lisp.exception.LispMalformedPacketException) XtrReplyMappingBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.XtrReplyMappingBuilder)

Aggregations

LispMalformedPacketException (org.opendaylight.lispflowmapping.southbound.lisp.exception.LispMalformedPacketException)1 MapReply (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.MapReply)1 XtrReplyMappingBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.XtrReplyMappingBuilder)1