Package step.client

Class StepClient

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public class StepClient
    extends java.lang.Object
    implements java.io.Closeable
    This class provides a single point of access to the STEP services.
    • Field Detail

      • credentials

        protected final step.client.credentials.ControllerCredentials credentials
    • Constructor Detail

      • StepClient

        public StepClient()
        Creates a new StepClient and logins to the controller using the controller host and credentials provided by SyspropCredendialsBuilder
      • StepClient

        public StepClient​(java.lang.String controllerUrl)
        Creates a new StepClient and logins to the controller without credentials (for controller that have disabled authentication)
        Parameters:
        controllerUrl - the URL of the controller (for instance: http://mycontroller.com)
      • StepClient

        public StepClient​(java.lang.String controllerUrl,
                          java.lang.String username,
                          java.lang.String password)
        Creates a new StepClient and logins to the controller using the credentials provided as argument
        Parameters:
        controllerUrl - the URL of the controller (for instance: http://mycontroller.com)
        username - the username to be used to login to the controller
        password - the password to be used to login to the controller
      • StepClient

        public StepClient​(java.lang.String controllerUrl,
                          java.lang.String token)
        Creates a new StepClient and logins to the controller using the credentials provided as argument
        Parameters:
        controllerUrl - the URL of the controller (for instance: http://mycontroller.com)
        token - the authentication token to be used to access the controller
      • StepClient

        public StepClient​(step.client.credentials.ControllerCredentials controllerCredentials)
        Creates a new StepClient and logins to the controller using the credentials provided as argument
        Parameters:
        controllerCredentials - the complex object already containing all of the login information
    • Method Detail

      • selectTenant

        public void selectTenant​(java.lang.String tenantName)
                          throws java.lang.Exception
        Select a specific tenant. This is function is equivalent to the selection of a tenant in GUI on the right corner
        Parameters:
        tenantName - the name of the tenant to be selected. In the GUI this is the name of tenant as displayed in the dropdown
        Throws:
        java.lang.Exception
      • getAvailableTenants

        public java.util.List<step.controller.multitenancy.Tenant> getAvailableTenants()
        Returns:
        the list of tenants available in the current session
      • getCurrentTenant

        public step.controller.multitenancy.Tenant getCurrentTenant()
        Returns:
        the current tenant
      • getMultitenancyClient

        public step.controller.multitenancy.client.MultitenancyClient getMultitenancyClient()
        Returns:
        the MultitenancyClient. Use this client for advanced tenant operations
      • getPlanBuilders

        public PlanBuilders getPlanBuilders()
        Deprecated.
        This method will be removed in future releases. To create a Plan programmatically use PlanBuilder.create() instead. To parse a plain text plan use PlanParser directly
        Returns:
        the available Plan builders to build Plan instances
      • getPlans

        public PlanClient getPlans()
        Returns:
        the PlanRepository to access the Plans listed under "Plans"
      • getPlanRunners

        public PlanRunners getPlanRunners()
        Deprecated.
        This method will be removed in future releases. To run a plan locally use ExecutionEngine directly. To run a plan located on your controller use RemoteExecutionManager
        Returns:
        the available plan runners for execution of "Plans"
      • getFunctionPackageClient

        public step.functions.packages.client.FunctionPackageClient getFunctionPackageClient()
        Returns:
        the FunctionPackageClient to add/delete FunctionPackages and thus add/delete Functions aka Keywords in batch
      • getFunctionManager

        public step.client.functions.RemoteFunctionManager getFunctionManager()
        Returns:
        the function manager to add/delete/get functions (aka Keywords)
      • getFunctionExecutionService

        public step.functions.execution.FunctionExecutionService getFunctionExecutionService()
        Returns:
        the function execution service to run functions remotely. For advanced users only.
      • getResourceManager

        public step.client.resources.RemoteResourceManager getResourceManager()
        Returns:
        the resource manager to upload resources (Keyword files, etc) to the controller
      • getExecutionManager

        public step.client.executions.RemoteExecutionManager getExecutionManager()
        Returns:
        the execution manager to start/stop/monitor executions
      • getEventBrokerClient

        public RemoteEventBrokerClient getEventBrokerClient()
        Returns:
        a client for the EventBroker of the controller
      • getRemoteAccessors

        public step.client.accessors.RemoteAccessors getRemoteAccessors()
        Returns:
        the remote accessors to access low-level entities directly. For advanced users only.
      • getStagingRepositoryClient

        public step.client.repository.StagingRepositoryClient getStagingRepositoryClient()
        Deprecated.
        The staging client is deprecated and will be removed in future releases. All executions are now providing an isolated context thus making the Staging repository useless.
        Returns:
        the staging client to run fully isolated executions on the controller
      • getControllerServicesClient

        public step.client.controller.ControllerServicesClient getControllerServicesClient()
        Returns:
        a client for the miscellaneous controller services
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException