Package net.solarnetwork.node.setup
Interface SetupService
public interface SetupService
API for node setup support.
- Version:
- 1.3
- Author:
- matt
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringTopic for when a network association has been accepted. -
Method Summary
Modifier and TypeMethodDescriptionnet.solarnetwork.domain.NetworkCertificateacceptNetworkAssociation(net.solarnetwork.domain.NetworkAssociationDetails details) Associate this node with a SolarNet central service, using details previously obtained viadecodeVerificationCode(String).net.solarnetwork.domain.NetworkAssociationDetailsdecodeVerificationCode(String verificationCode) Decode a SolarNet verification code to determine the service that the node should register itself with.Get the application configuration.voidrenewNetworkCertificate(String password) Renew the node's active certificate.net.solarnetwork.domain.NetworkAssociationretrieveNetworkAssociation(net.solarnetwork.domain.NetworkAssociationDetails details) Use theNetworkIdentitysettings in the supplieddetailsto retrieve the server identity, terms of service, security phrase, etc.
-
Field Details
-
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 theNetworkIdentitysettings in the supplieddetailsto 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 viadecodeVerificationCode(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
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
-