Package com.dnanexus
Class DXEnvironment
- java.lang.Object
-
- com.dnanexus.DXEnvironment
-
- All Implemented Interfaces:
AutoCloseable
public class DXEnvironment extends Object implements AutoCloseable
Immutable class storing configuration for selecting, authenticating to, and communicating with a DNAnexus API server.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDXEnvironment.BuilderBuilder class for creating DXEnvironment objects.static classDXEnvironment.ProxyDesc
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidclose()static DXEnvironmentcreate()Creates a DXEnvironment from the default settings.StringgetApiserverPath()Returns the fully qualified API server address (including protocol, host, and port).intgetConnectionTimeout()Returns connection read timeout for http clientDXJobgetJob()Returns a handler to the currently running job.DXProjectgetProjectContext()Returns the current project context.DXEnvironment.ProxyDescgetProxy()Returns the proxycom.fasterxml.jackson.databind.JsonNodegetSecurityContext()Deprecated.intgetSocketTimeout()Returns socket read timeout for http clientDXContainergetWorkspace()Returns the temporary workspace of the currently running job, or the current project if this method is called outside the Execution Environment.booleanisRetryDisabled()Returns whether the retry of HTTP requests should be disabled.
-
-
-
Method Detail
-
create
public static DXEnvironment create()
Creates a DXEnvironment from the default settings.This is the same as
Builder.fromDefaults().build().- Returns:
- newly created DXEnvironment
-
getApiserverPath
public String getApiserverPath()
Returns the fully qualified API server address (including protocol, host, and port).- Returns:
- API server path
-
getJob
public DXJob getJob()
Returns a handler to the currently running job.- Returns:
- job object, or
nullif the currently running job cannot be determined
-
getProjectContext
public DXProject getProjectContext()
Returns the current project context.- Returns:
- project, or
nullif the project context cannot be determined
-
getSecurityContext
@Deprecated public com.fasterxml.jackson.databind.JsonNode getSecurityContext()
Deprecated.Returns the security context JSON.- Returns:
- security context
-
getWorkspace
public DXContainer getWorkspace()
Returns the temporary workspace of the currently running job, or the current project if this method is called outside the Execution Environment.- Returns:
DXContainerfor the container, ornullif the container cannot be determined
-
isRetryDisabled
public boolean isRetryDisabled()
Returns whether the retry of HTTP requests should be disabled.- Returns:
- boolean
-
getSocketTimeout
public int getSocketTimeout()
Returns socket read timeout for http client
-
getProxy
public DXEnvironment.ProxyDesc getProxy()
Returns the proxy
-
getConnectionTimeout
public int getConnectionTimeout()
Returns connection read timeout for http client
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Throws:
IOException
-
-