public class ClientContext extends Object
Operation. An execution context typically consists of the desired
authentication credentials and client configurations such as timeouts. Currently, it is set up using a JSON config
file which is received as part of DC Services SDK On-boarding.
For each set of authentication credentials, a ClientContext instance can be reused across operations.
Sample Usage:
ClientContext context = ClientContext.createFromFile("dc-services-sdk-config.json");
CreatePDFOperation cpdfOperation = CreatePDFOperation.createNew();
cpdfOperation.setInput(FileRef.createFromLocalFile("~/Documents/createPdfInput.docx"));
cpdfOperation.execute(context);
| Modifier | Constructor and Description |
|---|---|
protected |
ClientContext() |
| Modifier and Type | Method and Description |
|---|---|
static ClientContext |
createFromFile(String filePath)
Creates a context instance using the provided JSON config file path.
|
ClientContext |
withAuthentication(Authentication authentication)
Creates a copy of this ClientContext with the provided Authentication instance.
|
public static ClientContext createFromFile(String filePath) throws IOException
ClientContext instanceFileNotFoundException - if the config file is not found at the specified pathIOException - if an I/O error occurs while reading the config filepublic ClientContext withAuthentication(Authentication authentication)
authentication - - an Authentication instanceClientContext instanceCopyright © 2019 Adobe. All rights reserved.