Interface SetupService


public interface SetupService
API for node setup support.
Version:
1.3
Author:
matt
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Topic for when a network association has been accepted.
  • Method Summary

    Modifier and Type
    Method
    Description
    net.solarnetwork.domain.NetworkCertificate
    acceptNetworkAssociation(net.solarnetwork.domain.NetworkAssociationDetails details)
    Associate this node with a SolarNet central service, using details previously obtained via decodeVerificationCode(String).
    net.solarnetwork.domain.NetworkAssociationDetails
    decodeVerificationCode(String verificationCode)
    Decode a SolarNet verification code to determine the service that the node should register itself with.
    Get the application configuration.
    void
    Renew the node's active certificate.
    net.solarnetwork.domain.NetworkAssociation
    retrieveNetworkAssociation(net.solarnetwork.domain.NetworkAssociationDetails details)
    Use the NetworkIdentity settings in the supplied details to retrieve the server identity, terms of service, security phrase, etc.
  • Field Details

    • TOPIC_NETWORK_ASSOCIATION_ACCEPTED

      static final String TOPIC_NETWORK_ASSOCIATION_ACCEPTED
      Topic for when a network association has been accepted.
      See Also:
  • Method Details

    • decodeVerificationCode

      net.solarnetwork.domain.NetworkAssociationDetails decodeVerificationCode(String verificationCode) throws InvalidVerificationCodeException
      Decode a SolarNet verification code to determine the service that the node should register itself with.
      Parameters:
      verificationCode - The verification code supplied by SolarNet to decode.
      Returns:
      details for the given SolarNet host
      Throws:
      InvalidVerificationCodeException - thrown if an error is encountered decoding the verification code.
    • retrieveNetworkAssociation

      net.solarnetwork.domain.NetworkAssociation retrieveNetworkAssociation(net.solarnetwork.domain.NetworkAssociationDetails details)
      Use the NetworkIdentity settings in the supplied details to retrieve the server identity, terms of service, security phrase, etc.
      Parameters:
      details - Contains the host details to determine where we retrieve the association from
      Returns:
      the NetworkAssociation
    • acceptNetworkAssociation

      net.solarnetwork.domain.NetworkCertificate acceptNetworkAssociation(net.solarnetwork.domain.NetworkAssociationDetails details) throws SetupException
      Associate this node with a SolarNet central service, using details previously obtained via decodeVerificationCode(String).
      Parameters:
      details - the host details to associate with
      Returns:
      the resulting NetworkCertificate
      Throws:
      SetupException - thrown if an error is encountered confirming the server association
    • renewNetworkCertificate

      void renewNetworkCertificate(String password) throws SetupException
      Renew the node's active certificate. The node must already be associated before this method will work. The renewal will be processed in the future.
      Parameters:
      password - A password to encrypt the keystore with when passing to SolarNet.
      Throws:
      SetupException - if an error is encountered renewing the certificate
      Since:
      1.2
    • getAppConfiguration

      NodeAppConfiguration getAppConfiguration()
      Get the application configuration.

      The application configuration includes network service URLs returned by the SolarUser and SolarQuery applications.

      Returns:
      the app configuration, never null
      Since:
      1.3