Class GatewayObserver

java.lang.Object
org.openremote.agent.protocol.tradfri.device.Observer
org.openremote.agent.protocol.tradfri.device.GatewayObserver
All Implemented Interfaces:
org.eclipse.californium.core.CoapHandler

public class GatewayObserver extends Observer
The class that observes an IKEA TRÃ…DFRI gateway to automagically detect changes
  • Constructor Details

    • GatewayObserver

      public GatewayObserver(Gateway gateway, CoapClient coapClient)
      Construct the GatewayObserver class
      Parameters:
      gateway - The IKEA TRÃ…DFRI gateway to observe
      coapClient - A CoAP client that can be used to communicate with the device using the IKEA TRÃ…DFRI gateway
  • Method Details

    • start

      public boolean start()
      Start observing the gateway to automagically detect changes
      Overrides:
      start in class Observer
      Returns:
      True if successfully started observing, false if not
    • callEventHandlers

      public void callEventHandlers(String payload)
      Handles a new response from the CoAP client and calls the appropriate event handlers for the IKEA TRÃ…DFRI gateway
      Specified by:
      callEventHandlers in class Observer
      Parameters:
      payload - The payload of the response to the CoAP request