public static class DXEnvironment.Builder extends Object
The resulting DXEnvironment has its fields set from the following sources, in order (with later items overriding earlier items):
fromFile(File)
).Constructor and Description |
---|
Builder()
Deprecated.
Use
fromDefaults() instead |
Modifier and Type | Method and Description |
---|---|
DXEnvironment |
build()
Build the DXEnvironment from the settings configured so far.
|
DXEnvironment.Builder |
disableRetry()
Disables automatic retry of HTTP requests.
|
static DXEnvironment.Builder |
fromDefaults()
Creates a Builder object using the JSON config in the file
~/.dnanexus_config/environment.json . |
static DXEnvironment.Builder |
fromEnvironment(DXEnvironment templateEnvironment)
Creates a Builder object with initial settings copied from the specified environment.
|
static DXEnvironment.Builder |
fromFile(File environmentJsonFile)
Creates a Builder object using the JSON config in the specified file.
|
DXEnvironment.Builder |
maxTotalConnections(int maxTotalConnections)
Sets maxTotalConnections for httpclient
|
DXEnvironment.Builder |
setApiserverHost(String apiserverHost)
Sets the API server hostname.
|
DXEnvironment.Builder |
setApiserverPort(int apiserverPort)
Sets the API server port.
|
DXEnvironment.Builder |
setApiserverProtocol(String apiserverProtocol)
Sets the API server protocol ("http" or "https").
|
DXEnvironment.Builder |
setBearerToken(String token)
Sets the token to use to authenticate to the Platform.
|
DXEnvironment.Builder |
setConnectionTimeout(int connectionTimeout)
Sets connection timeout of HTTP requests.
|
DXEnvironment.Builder |
setHttpProxy(String httpProxy)
Sets the HTTP proxy server
|
DXEnvironment.Builder |
setJob(DXJob job)
Sets the current job to the specified job.
|
DXEnvironment.Builder |
setMaxDefaultConnectionsPerRoute(int maxDefaultConnectionsPerRoute)
Sets maxDefaultConnectionsPerRoute for httpClient
|
DXEnvironment.Builder |
setProjectContext(DXProject projectContext)
Sets the project context to the specified project.
|
DXEnvironment.Builder |
setSecurityContext(com.fasterxml.jackson.databind.JsonNode json)
Deprecated.
Use
setBearerToken(String) instead. |
DXEnvironment.Builder |
setSocketTimeout(int socketTimeout)
Sets socket timeout of HTTP requests.
|
DXEnvironment.Builder |
setWorkspace(DXContainer workspace)
Sets the workspace to the specified container.
|
@Deprecated public Builder()
fromDefaults()
instead~/.dnanexus_config/environment.json
.public static DXEnvironment.Builder fromDefaults()
~/.dnanexus_config/environment.json
.public static DXEnvironment.Builder fromEnvironment(DXEnvironment templateEnvironment)
templateEnvironment
- environment to initialize this Builder frompublic static DXEnvironment.Builder fromFile(File environmentJsonFile)
environmentJsonFile
- JSON file from which to load configuration defaultspublic DXEnvironment build()
public DXEnvironment.Builder setApiserverHost(String apiserverHost)
apiserverHost
- API server hostnamepublic DXEnvironment.Builder setApiserverPort(int apiserverPort)
apiserverPort
- API server portpublic DXEnvironment.Builder setApiserverProtocol(String apiserverProtocol)
apiserverProtocol
- API server protocolpublic DXEnvironment.Builder setBearerToken(String token)
token
- bearer tokenpublic DXEnvironment.Builder setJob(DXJob job)
job
- job objectpublic DXEnvironment.Builder setProjectContext(DXProject projectContext)
projectContext
- project context@Deprecated public DXEnvironment.Builder setSecurityContext(com.fasterxml.jackson.databind.JsonNode json)
setBearerToken(String)
instead.json
- security context JSONpublic DXEnvironment.Builder setWorkspace(DXContainer workspace)
workspace
- workspace containerpublic DXEnvironment.Builder disableRetry()
public DXEnvironment.Builder setConnectionTimeout(int connectionTimeout)
connectionTimeout
- integerpublic DXEnvironment.Builder setSocketTimeout(int socketTimeout)
socketTimeout
- integerpublic DXEnvironment.Builder maxTotalConnections(int maxTotalConnections)
maxTotalConnections
- integerpublic DXEnvironment.Builder setMaxDefaultConnectionsPerRoute(int maxDefaultConnectionsPerRoute)
maxDefaultConnectionsPerRoute
- integerpublic DXEnvironment.Builder setHttpProxy(String httpProxy)
httpProxy
- StringCopyright © 2023. All Rights Reserved.