Search in sources :

Example 1 with RemoveEventDataBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.remove.dpn.event.RemoveEventDataBuilder in project netvirt by opendaylight.

the class VpnFootprintService method publishRemoveNotification.

private void publishRemoveNotification(final BigInteger dpnId, final String vpnName, final String rd) {
    LOG.debug("publishRemoveNotification: Sending notification for remove dpn {} in vpn {} rd {} event ", dpnId, vpnName, rd);
    RemoveEventData data = new RemoveEventDataBuilder().setVpnName(vpnName).setRd(rd).setDpnId(dpnId).build();
    RemoveDpnEvent event = new RemoveDpnEventBuilder().setRemoveEventData(data).build();
    final ListenableFuture<?> eventFuture = notificationPublishService.offerNotification(event);
    Futures.addCallback(eventFuture, new FutureCallback<Object>() {

        @Override
        public void onFailure(Throwable error) {
            LOG.error("publishRemoveNotification: Error in notifying listeners for remove dpn {} in vpn {} rd {}" + " event ", dpnId, vpnName, rd, error);
        }

        @Override
        public void onSuccess(Object arg) {
            LOG.info("publishRemoveNotification: Successful in notifying listeners for remove dpn {} in vpn {}" + " rd {} event ", dpnId, vpnName, rd);
        }
    }, MoreExecutors.directExecutor());
}
Also used : RemoveDpnEventBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.RemoveDpnEventBuilder) RemoveEventDataBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.remove.dpn.event.RemoveEventDataBuilder) RemoveEventData(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.remove.dpn.event.RemoveEventData) RemoveDpnEvent(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.RemoveDpnEvent)

Aggregations

RemoveDpnEvent (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.RemoveDpnEvent)1 RemoveDpnEventBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.RemoveDpnEventBuilder)1 RemoveEventData (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.remove.dpn.event.RemoveEventData)1 RemoveEventDataBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.remove.dpn.event.RemoveEventDataBuilder)1