public class ClientManager extends Object
ClientManager provides support for configuring API classes using values set via a properties file (~/bridge-sdk.properties), from environment variables, or from Java system variables. The key values you can set:
ENV
property (local, develop, staging, and production). An alternative to setting the
host server through the ENV
property, you can also set the service
host directly (e.g. "https://bridge.deployment.com/").Once you provide credentials (through configuration or programmatically), clients retrieved through this class will re-authenticate the caller if the session expires.
The ClientManager contacts our production servers unless you configure another
Environment
.
Modifier and Type | Class and Description |
---|---|
static class |
ClientManager.Builder |
Modifier and Type | Method and Description |
---|---|
List<String> |
getAcceptedLanguages() |
<T> T |
getClient(Class<T> service) |
ClientInfo |
getClientInfo() |
Config |
getConfig() |
String |
getHostUrl() |
UserSessionInfo |
getSessionOfClients() |
static String |
getUrl(Environment env) |
public final UserSessionInfo getSessionOfClients()
public final Config getConfig()
public final ClientInfo getClientInfo()
public final String getHostUrl()
public static String getUrl(Environment env)
public <T> T getClient(Class<T> service)
T
- One of the Api classes in the org.sagebionetworks.bridge.rest.api package.service
- Class representing the serviceCopyright © 2022 Sage Bionetworks. All rights reserved.