Interface SystemService


public interface SystemService
API for node system services, such as restarting, rebooting, or making system configuration changes.
Since:
1.47
Version:
1.3
Author:
matt
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The instruction topic for a request to reboot the SolarNode device.
    static final String
    The instruction topic for a request to perform a factory reset of the SolarNode device.
    static final String
    The instruction topic for a request to restart the SolarNode application.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addHostAlias(String alias, InetAddress address)
    Add a host alias.
    void
    exit(boolean syncState)
    Exit the node application, stopping the active process.
    org.springframework.util.MultiValueMap<InetAddress,String>
    Get the available host aliases.
    void
    Reboot the device the application is running on.
    void
    Remove a host alias.
    void
    reset(boolean applicationOnly)
    Perform a factory reset.
  • Field Details

    • TOPIC_RESTART

      static final String TOPIC_RESTART
      The instruction topic for a request to restart the SolarNode application.

      In practice this could mean invoking the exit(boolean) method, assuming the node OS automatically restarts the application when it exits.

      Since:
      1.1
      See Also:
    • TOPIC_REBOOT

      static final String TOPIC_REBOOT
      The instruction topic for a request to reboot the SolarNode device.

      In practice this could mean invoking the reboot() method.

      Since:
      1.1
      See Also:
    • TOPIC_RESET

      static final String TOPIC_RESET
      The instruction topic for a request to perform a factory reset of the SolarNode device.

      In practice this could mean invoking the reset(boolean) method.

      Since:
      1.2
      See Also:
  • Method Details

    • exit

      void exit(boolean syncState)
      Exit the node application, stopping the active process.
      Parameters:
      syncState - A flag to indicate (when true) that any transient data should be persisted to permanent storage.
    • reboot

      void reboot()
      Reboot the device the application is running on.
    • reset

      void reset(boolean applicationOnly)
      Perform a factory reset.
      Parameters:
      applicationOnly - if true then only reset SolarNode application settings; if false then also reset OS-level settings (such as network passwords).
      Since:
      1.2
    • hostAliases

      org.springframework.util.MultiValueMap<InetAddress,String> hostAliases()
      Get the available host aliases.
      Returns:
      the host aliases, never null
      Since:
      1.3
    • addHostAlias

      void addHostAlias(String alias, InetAddress address)
      Add a host alias.
      Parameters:
      alias - the hostname to add
      address - the host address
    • removeHostAlias

      void removeHostAlias(String alias)
      Remove a host alias.
      Parameters:
      alias - the alias to remove