Package com.dnanexus

Class 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.
    • 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 null if the currently running job cannot be determined
      • getProjectContext

        public DXProject getProjectContext()
        Returns the current project context.
        Returns:
        project, or null if 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:
        DXContainer for the container, or null if 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
      • getConnectionTimeout

        public int getConnectionTimeout()
        Returns connection read timeout for http client