import java.util.concurrent.ExecutionException;
import org.opendaylight.controller.sal.binding.api.AbstractBindingAwareConsumer;
+import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ConsumerContext;
import org.opendaylight.controller.sal.binding.api.BindingAwareConsumer;
import org.opendaylight.controller.sal.binding.api.NotificationListener;
import org.opendaylight.controller.sal.binding.api.NotificationService;
-import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ConsumerContext;
-import org.opendaylight.controller.sal.binding.api.data.DataBrokerService;
-import org.opendaylight.controller.sal.common.GlobalDataStore;
import org.opendaylight.controller.sample.toaster.provider.api.ToastConsumer;
import org.opendaylight.yang.gen.v1.http.netconfcentral.org.ns.toaster.rev091120.MakeToastInputBuilder;
import org.opendaylight.yang.gen.v1.http.netconfcentral.org.ns.toaster.rev091120.ToastDone;
import org.opendaylight.yang.gen.v1.http.netconfcentral.org.ns.toaster.rev091120.ToastType;
-import org.opendaylight.yang.gen.v1.http.netconfcentral.org.ns.toaster.rev091120.Toaster;
-import org.opendaylight.yang.gen.v1.http.netconfcentral.org.ns.toaster.rev091120.ToasterData;
import org.opendaylight.yang.gen.v1.http.netconfcentral.org.ns.toaster.rev091120.ToasterService;
import org.opendaylight.yangtools.yang.common.RpcResult;
import org.osgi.framework.BundleActivator;
RpcResult<Void> result = getToastService().makeToast(toastInput.build()).get();
if (result.isSuccessful()) {
- log.info("Toast was successfuly finished");
+ log.trace("Toast was successfuly finished");
} else {
- log.info("Toast was not successfuly finished");
+ log.warn("Toast was not successfuly finished");
}
return result.isSuccessful();
} catch (InterruptedException | ExecutionException e) {
- log.info("Error occured during toast creation");
+ log.warn("Error occured during toast creation");
}
return false;
}
-
+
@Override
@Deprecated
protected void startImpl(BundleContext context) {
public void onSessionInitialized(ConsumerContext session) {
this.session = session;
NotificationService notificationService = session.getSALService(NotificationService.class);
- notificationService.addNotificationListener(ToastDone.class, this);
+ notificationService.registerNotificationListener(ToastDone.class, this);
}
@Override
public void onNotification(ToastDone notification) {
- log.info("ToastDone Notification Received: {} ",notification.getToastStatus());
+ log.trace("ToastDone Notification Received: {} ",notification.getToastStatus());
}