Class OpendaylightToaster

java.lang.Object
org.opendaylight.controller.md.sal.common.util.jmx.AbstractMXBean
org.opendaylight.controller.sample.toaster.provider.OpendaylightToaster
All Implemented Interfaces:
AutoCloseable, EventListener, ToasterProviderRuntimeMXBean, org.opendaylight.mdsal.binding.api.DataTreeChangeListener<org.opendaylight.yang.gen.v1.http.netconfcentral.org.ns.toaster.rev091120.Toaster>, org.opendaylight.yang.gen.v1.http.netconfcentral.org.ns.toaster.rev091120.ToasterService, org.opendaylight.yangtools.yang.binding.RpcService

@Singleton public final class OpendaylightToaster extends org.opendaylight.controller.md.sal.common.util.jmx.AbstractMXBean implements org.opendaylight.yang.gen.v1.http.netconfcentral.org.ns.toaster.rev091120.ToasterService, ToasterProviderRuntimeMXBean, org.opendaylight.mdsal.binding.api.DataTreeChangeListener<org.opendaylight.yang.gen.v1.http.netconfcentral.org.ns.toaster.rev091120.Toaster>, AutoCloseable
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static @interface 
     
  • Field Summary

    Fields inherited from class org.opendaylight.controller.md.sal.common.util.jmx.AbstractMXBean

    BASE_JMX_PREFIX
  • Constructor Summary

    Constructors
    Constructor
    Description
    OpendaylightToaster(org.opendaylight.mdsal.binding.api.DataBroker dataProvider, org.opendaylight.mdsal.binding.api.NotificationPublishService notificationPublishService, org.opendaylight.mdsal.binding.api.RpcProviderService rpcProviderService)
     
    OpendaylightToaster(org.opendaylight.mdsal.binding.api.DataBroker dataProvider, org.opendaylight.mdsal.binding.api.NotificationPublishService notificationPublishService, org.opendaylight.mdsal.binding.api.RpcProviderService rpcProviderService, @NonNull OpendaylightToaster.Configuration configuration)
     
    OpendaylightToaster(org.opendaylight.mdsal.binding.api.DataBroker dataProvider, org.opendaylight.mdsal.binding.api.NotificationPublishService notificationPublishService, org.opendaylight.mdsal.binding.api.RpcProviderService rpcProviderService, String manufacturer, String modelNumber, int maxMakeToastTries)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<org.opendaylight.yang.gen.v1.http.netconfcentral.org.ns.toaster.rev091120.CancelToastOutput>>
    cancelToast(org.opendaylight.yang.gen.v1.http.netconfcentral.org.ns.toaster.rev091120.CancelToastInput input)
    RPC call implemented from the ToasterService interface that cancels the current toast, if any.
    void
    JMX RPC call implemented from the ToasterProviderRuntimeMXBean interface.
    void
    Implemented from the AutoCloseable interface.
    Accesssor method implemented from the ToasterProviderRuntimeMXBean interface.
    com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<org.opendaylight.yang.gen.v1.http.netconfcentral.org.ns.toaster.rev091120.MakeToastOutput>>
    makeToast(org.opendaylight.yang.gen.v1.http.netconfcentral.org.ns.toaster.rev091120.MakeToastInput input)
    RPC call implemented from the ToasterService interface that attempts to make toast.
    void
    onDataTreeChanged(Collection<org.opendaylight.mdsal.binding.api.DataTreeModification<org.opendaylight.yang.gen.v1.http.netconfcentral.org.ns.toaster.rev091120.Toaster>> changes)
    Implemented from the DataTreeChangeListener interface.
    com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<org.opendaylight.yang.gen.v1.http.netconfcentral.org.ns.toaster.rev091120.RestockToasterOutput>>
    restockToaster(org.opendaylight.yang.gen.v1.http.netconfcentral.org.ns.toaster.rev091120.RestockToasterInput input)
    RestConf RPC call implemented from the ToasterService interface.

    Methods inherited from class org.opendaylight.controller.md.sal.common.util.jmx.AbstractMXBean

    getMBeanCategory, getMBeanName, getMBeanType, register, registerMBean, unregister, unregisterMBean

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.opendaylight.mdsal.binding.api.DataTreeChangeListener

    onInitialData
  • Constructor Details

    • OpendaylightToaster

      public OpendaylightToaster(org.opendaylight.mdsal.binding.api.DataBroker dataProvider, org.opendaylight.mdsal.binding.api.NotificationPublishService notificationPublishService, org.opendaylight.mdsal.binding.api.RpcProviderService rpcProviderService, String manufacturer, String modelNumber, int maxMakeToastTries)
    • OpendaylightToaster

      @Inject public OpendaylightToaster(org.opendaylight.mdsal.binding.api.DataBroker dataProvider, org.opendaylight.mdsal.binding.api.NotificationPublishService notificationPublishService, org.opendaylight.mdsal.binding.api.RpcProviderService rpcProviderService)
    • OpendaylightToaster

      public OpendaylightToaster(org.opendaylight.mdsal.binding.api.DataBroker dataProvider, org.opendaylight.mdsal.binding.api.NotificationPublishService notificationPublishService, org.opendaylight.mdsal.binding.api.RpcProviderService rpcProviderService, @NonNull OpendaylightToaster.Configuration configuration)
  • Method Details

    • close

      @PreDestroy public void close()
      Implemented from the AutoCloseable interface.
      Specified by:
      close in interface AutoCloseable
    • onDataTreeChanged

      public void onDataTreeChanged(Collection<org.opendaylight.mdsal.binding.api.DataTreeModification<org.opendaylight.yang.gen.v1.http.netconfcentral.org.ns.toaster.rev091120.Toaster>> changes)
      Implemented from the DataTreeChangeListener interface.
      Specified by:
      onDataTreeChanged in interface org.opendaylight.mdsal.binding.api.DataTreeChangeListener<org.opendaylight.yang.gen.v1.http.netconfcentral.org.ns.toaster.rev091120.Toaster>
    • cancelToast

      public com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<org.opendaylight.yang.gen.v1.http.netconfcentral.org.ns.toaster.rev091120.CancelToastOutput>> cancelToast(org.opendaylight.yang.gen.v1.http.netconfcentral.org.ns.toaster.rev091120.CancelToastInput input)
      RPC call implemented from the ToasterService interface that cancels the current toast, if any.
      Specified by:
      cancelToast in interface org.opendaylight.yang.gen.v1.http.netconfcentral.org.ns.toaster.rev091120.ToasterService
    • makeToast

      public com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<org.opendaylight.yang.gen.v1.http.netconfcentral.org.ns.toaster.rev091120.MakeToastOutput>> makeToast(org.opendaylight.yang.gen.v1.http.netconfcentral.org.ns.toaster.rev091120.MakeToastInput input)
      RPC call implemented from the ToasterService interface that attempts to make toast.
      Specified by:
      makeToast in interface org.opendaylight.yang.gen.v1.http.netconfcentral.org.ns.toaster.rev091120.ToasterService
    • restockToaster

      public com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<org.opendaylight.yang.gen.v1.http.netconfcentral.org.ns.toaster.rev091120.RestockToasterOutput>> restockToaster(org.opendaylight.yang.gen.v1.http.netconfcentral.org.ns.toaster.rev091120.RestockToasterInput input)
      RestConf RPC call implemented from the ToasterService interface. Restocks the bread for the toaster, resets the toastsMade counter to 0, and sends a ToasterRestocked notification.
      Specified by:
      restockToaster in interface org.opendaylight.yang.gen.v1.http.netconfcentral.org.ns.toaster.rev091120.ToasterService
    • clearToastsMade

      public void clearToastsMade()
      JMX RPC call implemented from the ToasterProviderRuntimeMXBean interface.
      Specified by:
      clearToastsMade in interface ToasterProviderRuntimeMXBean
    • getToastsMade

      public Long getToastsMade()
      Accesssor method implemented from the ToasterProviderRuntimeMXBean interface.
      Specified by:
      getToastsMade in interface ToasterProviderRuntimeMXBean