X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsamples%2Ftoaster-consumer%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsample%2Fkitchen%2Fimpl%2FKitchenServiceImpl.java;h=4f245685aa6318f9a477b2ea576222b655142117;hb=refs%2Fchanges%2F27%2F100827%2F7;hp=1e5c10c0c1f8bb4c5a29b400889b22ec18fb12c7;hpb=e84f63ee098fff5b02cbce1281ca0d1208f966fa;p=controller.git diff --git a/opendaylight/md-sal/samples/toaster-consumer/src/main/java/org/opendaylight/controller/sample/kitchen/impl/KitchenServiceImpl.java b/opendaylight/md-sal/samples/toaster-consumer/src/main/java/org/opendaylight/controller/sample/kitchen/impl/KitchenServiceImpl.java index 1e5c10c0c1..4f245685aa 100644 --- a/opendaylight/md-sal/samples/toaster-consumer/src/main/java/org/opendaylight/controller/sample/kitchen/impl/KitchenServiceImpl.java +++ b/opendaylight/md-sal/samples/toaster-consumer/src/main/java/org/opendaylight/controller/sample/kitchen/impl/KitchenServiceImpl.java @@ -16,7 +16,6 @@ import com.google.common.util.concurrent.MoreExecutors; import java.util.List; import java.util.concurrent.ExecutionException; import java.util.concurrent.Executors; -import java.util.concurrent.Future; import org.opendaylight.controller.md.sal.common.util.jmx.AbstractMXBean; import org.opendaylight.controller.sample.kitchen.api.EggsType; import org.opendaylight.controller.sample.kitchen.api.KitchenService; @@ -58,7 +57,7 @@ public class KitchenServiceImpl extends AbstractMXBean } @Override - public Future> makeBreakfast(final EggsType eggsType, final Class toastType, + public ListenableFuture> makeBreakfast(final EggsType eggsType, final ToastType toastType, final int toastDoneness) { // Call makeToast, The OpendaylightToaster impl already returns a ListenableFuture so the conversion is // actually a no-op. @@ -95,9 +94,7 @@ public class KitchenServiceImpl extends AbstractMXBean return executor.submit(() -> RpcResultBuilder.success().build()); } - private ListenableFuture> makeToast(final Class toastType, - final int toastDoneness) { - + private ListenableFuture> makeToast(final ToastType toastType, final int toastDoneness) { if (toasterOutOfBread) { LOG.info("We're out of toast but we can make eggs"); return RpcResultBuilder.success(EMPTY_MAKE_OUTPUT) @@ -118,7 +115,7 @@ public class KitchenServiceImpl extends AbstractMXBean public Boolean makeScrambledWithWheat() { try { // This call has to block since we must return a result to the JMX client. - RpcResult result = makeBreakfast(EggsType.SCRAMBLED, WheatBread.class, 2).get(); + RpcResult result = makeBreakfast(EggsType.SCRAMBLED, WheatBread.VALUE, 2).get(); if (result.isSuccessful()) { LOG.info("makeBreakfast succeeded"); } else {