use of org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.GotMapNotifyBuilder in project lispflowmapping by opendaylight.
the class LispSouthboundHandler method handleMapNotify.
@SuppressWarnings("checkstyle:IllegalCatch")
private void handleMapNotify(ByteBuffer inBuffer, InetAddress sourceAddress, int port) {
try {
MapNotify mapNotify = MapNotifySerializer.getInstance().deserialize(inBuffer);
GotMapNotifyBuilder gotMapNotifyBuilder = new GotMapNotifyBuilder();
gotMapNotifyBuilder.setMapNotify(LispNotificationHelper.convertMapNotify(mapNotify));
TransportAddressBuilder transportAddressBuilder = new TransportAddressBuilder();
transportAddressBuilder.setIpAddress(LispNotificationHelper.getIpAddressBinaryFromInetAddress(sourceAddress));
transportAddressBuilder.setPort(new PortNumber(port));
gotMapNotifyBuilder.setTransportAddress(transportAddressBuilder.build());
lispSbPlugin.sendNotificationIfPossible(gotMapNotifyBuilder.build());
} catch (RuntimeException re) {
throw new LispMalformedPacketException("Couldn't deserialize Map-Notify (len=" + inBuffer.capacity() + ")", re);
} catch (InterruptedException e) {
LOG.warn("Notification publication interrupted!");
}
}
Aggregations