Package step.client
Class StepClient
- java.lang.Object
-
- step.client.StepClient
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class StepClient extends java.lang.Object implements java.io.CloseableThis class provides a single point of access to the STEP services.
-
-
Field Summary
Fields Modifier and Type Field Description protected step.client.credentials.ControllerCredentialscredentials
-
Constructor Summary
Constructors Constructor Description StepClient()Creates a newStepClientand logins to the controller using the controller host and credentials provided bySyspropCredendialsBuilderStepClient(java.lang.String controllerUrl)Creates a newStepClientand logins to the controller without credentials (for controller that have disabled authentication)StepClient(java.lang.String controllerUrl, java.lang.String token)Creates a newStepClientand logins to the controller using the credentials provided as argumentStepClient(java.lang.String controllerUrl, java.lang.String username, java.lang.String password)Creates a newStepClientand logins to the controller using the credentials provided as argumentStepClient(step.client.credentials.ControllerCredentials controllerCredentials)Creates a newStepClientand logins to the controller using the credentials provided as argument
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidclose()java.util.List<step.controller.multitenancy.Tenant>getAvailableTenants()step.client.controller.ControllerServicesClientgetControllerServicesClient()step.controller.multitenancy.TenantgetCurrentTenant()RemoteEventBrokerClientgetEventBrokerClient()step.client.executions.RemoteExecutionManagergetExecutionManager()step.functions.execution.FunctionExecutionServicegetFunctionExecutionService()step.client.functions.RemoteFunctionManagergetFunctionManager()step.functions.packages.client.FunctionPackageClientgetFunctionPackageClient()step.controller.multitenancy.client.MultitenancyClientgetMultitenancyClient()PlanBuildersgetPlanBuilders()Deprecated.This method will be removed in future releases.PlanRunnersgetPlanRunners()Deprecated.This method will be removed in future releases.PlanClientgetPlans()step.client.accessors.RemoteAccessorsgetRemoteAccessors()step.client.resources.RemoteResourceManagergetResourceManager()step.client.repository.StagingRepositoryClientgetStagingRepositoryClient()Deprecated.The staging client is deprecated and will be removed in future releases.voidselectTenant(java.lang.String tenantName)Select a specific tenant.
-
-
-
Constructor Detail
-
StepClient
public StepClient()
Creates a newStepClientand logins to the controller using the controller host and credentials provided bySyspropCredendialsBuilder
-
StepClient
public StepClient(java.lang.String controllerUrl)
Creates a newStepClientand 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 newStepClientand 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 controllerpassword- the password to be used to login to the controller
-
StepClient
public StepClient(java.lang.String controllerUrl, java.lang.String token)Creates a newStepClientand 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 newStepClientand 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.ExceptionSelect 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 usePlanBuilder.create()instead. To parse a plain text plan usePlanParserdirectly- 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 useExecutionEnginedirectly. To run a plan located on your controller useRemoteExecutionManager- Returns:
- the available plan runners for execution of "Plans"
-
getFunctionPackageClient
public step.functions.packages.client.FunctionPackageClient getFunctionPackageClient()
- Returns:
- the
FunctionPackageClientto add/deleteFunctionPackages and thus add/deleteFunctions 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:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
-