|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.Sericon.ProductAgents.AutoSSLAgent.ProductRegistrationAgent
public abstract class ProductRegistrationAgent
This is the main class of the AutoSSL Agent, and one of its subclasses should be instantiated when an application wishes to connect to an AutoSSL Server in order to provision an SSL certificate. The ProductRegistrationAgent will work in one of two modes:
The Keystore mode should be used by an application that wishes to delegate all of the control of the provisioning of an SSL certificate to the AutoSSL Agent.
The CSR mode should be used by an application that wishes to have the AutoSSL Server sign a certificate that is created outside of the AutoSSL process. This could happen for several reasons, such as the Web Server that the application contains requiring that it generate the keypair that it uses. If this is the case, then the AutoSSL Agent can accept an externally generated CSR and have it signed by the AutoSSL process. Of course, this assumes that the base domain being used is acceptable to the AutoSSL Server, and the CSR is properly formed for the AutoSSL process.
In both cases, the ProductRegistrationAgent is responsible to periodically contact the Naming Server to ensure that the resolution of its DNS name is properly updated, especially if the network that the application runs on has a dynamic IP address.
The ProductRegistrationAgent also requires a directory for it to write data to that it needs to retain between executions.
| Method Summary | |
|---|---|
void |
applicationFinished()
A method for the application to call when it is shutting down. |
int |
daysUntilCertificateExpires()
Find out how many days until the certificate expires. |
java.lang.String |
getBaseDomain()
Gets the base domain that's used for this application. |
BasicCustomerInfo |
getCustomerInformation()
Gets the basic customer information from the SSL certificate that was provisioned to this application. |
java.lang.Object |
getFTAgent()
For future development. |
java.lang.String |
getServerID()
Gets the serverID for this application. |
java.security.cert.X509Certificate |
getSSLCertificate()
Gets the SSL certificate that was provisioned to this application. |
boolean |
hasCertificate()
Determine whether or not this application has an SSL certificate. |
void |
registerForPeriodicServices(java.lang.Object objectTBD)
Register to connect to services that need to be periodically updated. Register to periodically connect to the Naming Server, a service of the AutoSSL Server that is responsible for all of the DNS names that are managed by the AutoSSL Server. |
java.lang.String |
reserveServerID(java.lang.String baseDomain,
java.lang.String serverID,
java.lang.String serverPassword)
Queries whether or not the serverID is in use, and if it isn't, reserves it. |
void |
validateLocationInformation(java.lang.String countryCode,
java.lang.String state,
java.lang.String city)
This is a convenience method to validate that a user's location information is well-formed. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public java.lang.Object getFTAgent()
public boolean hasCertificate()
public int daysUntilCertificateExpires()
throws PRAException
PRAException - An exception has occurred during the processing of this method, such as there not being
a certificate provisioned to this application.
public java.security.cert.X509Certificate getSSLCertificate()
throws PRAException
PRAExceptionpublic void applicationFinished()
public BasicCustomerInfo getCustomerInformation()
throws PRAException
PRAException - - For instance, there is no certificate provisioned.public java.lang.String getServerID()
public java.lang.String getBaseDomain()
public java.lang.String reserveServerID(java.lang.String baseDomain,
java.lang.String serverID,
java.lang.String serverPassword)
throws PRAException
baseDomain - The domain that will be used to create the DNS names that will be given to consumers
as part of their product registration. These DNS names will be subdomains of this base domain. This base domain
should be in its most simple form, as it will be the basis of other domain names. For example, you
should use autossl.com instead of www.autossl.com.serverID - The server ID that's to be used for this instance of the application. This, along with
the base domain, will combine to make the host name that will be used to locate this running instance
on the Internet (i.e. it will be the DNS name).serverPassword - Password to be used for the communication with the AutoSSL Server.
This string may come from the user, or be generated randomly per device.
PRAException - - This exception will contain the reason for failure if the serverID cannot be reserved
public void registerForPeriodicServices(java.lang.Object objectTBD)
throws PRAException
objectTBD - For future development. Must be set to null.
PRAException
public void validateLocationInformation(java.lang.String countryCode,
java.lang.String state,
java.lang.String city)
throws PRAException
countryCode - A valid ISO 3166-1 alpha-2 codestate - The name of the state or province, or an empty string if none existscity - The non-blank name of the city
PRAException - - This exception will contain the reason for failure if the location is not valid
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||