Service Factory

The Service factory is built with Service credentials and has access to the Service Client.

Creating a Service Factory

A Service factory can be made by using the Factory factory. It utilizes Service specific credentials to identify itself, encrypt and sign the request data, and verify the signature and decrypt encrypted response data. All of the information can be located on the Keys tab of the Service's page in Dashboard. The data is as follows:

  • Service ID
  • Private Key


String serviceId = "9e0310ba-d9d6-11e6-942a-b4750ee43a10;
String privateKey = "-----BEGIN RSA PRIVATE KEY-----\n"+
        "-----END RSA PRIVATE KEY-----\n";

ServiceFactory serviceFactory = factoryFactory.makeServiceFactory(serviceId, privateKey);

Making A Service Client

The Service client can be made without credentials as they have already been provided to the factory:

ServiceClient serviceClient = serviceFactory.makeServiceClient();

User Contributed

LaunchKey links to user contributed code as a resource to its community. LaunchKey does not in any way guarantee or warrant the quality and security of these code bases. User contributed code is supported by the creators. If you do find a link from the site to user contributed code that is malicious or inappropriate in any way, please report that link to LaunchKey immediately and we will investigate the claim. Submit any issue to LaunchKey support at ×