use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.add.dpn.event.AddEventData in project netvirt by opendaylight.
the class VpnFootprintService method publishAddNotification.
private void publishAddNotification(final BigInteger dpnId, final String vpnName, final String rd) {
LOG.debug("publishAddNotification: Sending notification for add dpn {} in vpn {} rd {} event ", dpnId, vpnName, rd);
AddEventData data = new AddEventDataBuilder().setVpnName(vpnName).setRd(rd).setDpnId(dpnId).build();
AddDpnEvent event = new AddDpnEventBuilder().setAddEventData(data).build();
final ListenableFuture<?> eventFuture = notificationPublishService.offerNotification(event);
Futures.addCallback(eventFuture, new FutureCallback<Object>() {
@Override
public void onFailure(Throwable error) {
LOG.error("publishAddNotification: Error in notifying listeners for add dpn {} in vpn {} rd {} event ", dpnId, vpnName, rd, error);
}
@Override
public void onSuccess(Object arg) {
LOG.info("publishAddNotification: Successful in notifying listeners for add dpn {} in vpn {} rd {}" + " event ", dpnId, vpnName, rd);
}
}, MoreExecutors.directExecutor());
}
Aggregations