Interface WattpilotClientListener

All Known Implementing Classes:
App

@NonNullByDefault public interface WattpilotClientListener
Interface for listening to events from the WattpilotClient.
Author:
Florian Hotze - Initial contribution
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Deprecated, for removal: This API element is subject to removal in a future version.
    default void
    Called when the client successfully connected to the wallbox and received the initial device
    void
    disconnected(String reason, @Nullable Throwable cause)
    Called when the client disconnected from the wallbox.
    default void
    Called when the client receives a status change from the wallbox.
  • Method Details

    • connected

      @Deprecated(forRemoval=true) default void connected()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Called when the client successfully connected to the wallbox.
    • connected

      default void connected(WattpilotInfo info)
      Called when the client successfully connected to the wallbox and received the initial device
      Parameters:
      info - the device info
    • disconnected

      void disconnected(String reason, @Nullable Throwable cause)
      Called when the client disconnected from the wallbox.
      Parameters:
      reason - the reason for the disconnection
      cause - the throwable that caused ungraceful disconnect or null if disconnection was graceful
    • statusChanged

      default void statusChanged(WattpilotStatus status)
      Called when the client receives a status change from the wallbox.
      Parameters:
      status - the new status