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.Closeable
This class provides a single point of access to the STEP services.
-
-
Field Summary
Fields Modifier and Type Field Description protected step.client.credentials.ControllerCredentials
credentials
-
Constructor Summary
Constructors Constructor Description StepClient()
Creates a newStepClient
and logins to the controller using the controller host and credentials provided bySyspropCredendialsBuilder
StepClient(java.lang.String controllerUrl)
Creates a newStepClient
and logins to the controller without credentials (for controller that have disabled authentication)StepClient(java.lang.String controllerUrl, java.lang.String token)
Creates a newStepClient
and logins to the controller using the credentials provided as argumentStepClient(java.lang.String controllerUrl, java.lang.String username, java.lang.String password)
Creates a newStepClient
and logins to the controller using the credentials provided as argumentStepClient(step.client.credentials.ControllerCredentials controllerCredentials)
Creates a newStepClient
and 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 void
close()
java.util.List<step.controller.multitenancy.Tenant>
getAvailableTenants()
step.client.controller.ControllerServicesClient
getControllerServicesClient()
step.controller.multitenancy.Tenant
getCurrentTenant()
RemoteEventBrokerClient
getEventBrokerClient()
step.client.executions.RemoteExecutionManager
getExecutionManager()
step.functions.execution.FunctionExecutionService
getFunctionExecutionService()
step.client.functions.RemoteFunctionManager
getFunctionManager()
step.functions.packages.client.FunctionPackageClient
getFunctionPackageClient()
step.controller.multitenancy.client.MultitenancyClient
getMultitenancyClient()
PlanBuilders
getPlanBuilders()
Deprecated.This method will be removed in future releases.PlanRunners
getPlanRunners()
Deprecated.This method will be removed in future releases.PlanClient
getPlans()
step.client.accessors.RemoteAccessors
getRemoteAccessors()
step.client.resources.RemoteResourceManager
getResourceManager()
step.client.repository.StagingRepositoryClient
getStagingRepositoryClient()
Deprecated.The staging client is deprecated and will be removed in future releases.void
selectTenant(java.lang.String tenantName)
Select a specific tenant.
-
-
-
Constructor Detail
-
StepClient
public StepClient()
Creates a newStepClient
and logins to the controller using the controller host and credentials provided bySyspropCredendialsBuilder
-
StepClient
public StepClient(java.lang.String controllerUrl)
Creates a newStepClient
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 newStepClient
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 controllerpassword
- the password to be used to login to the controller
-
StepClient
public StepClient(java.lang.String controllerUrl, java.lang.String token)
Creates a newStepClient
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 newStepClient
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 usePlanBuilder.create()
instead. To parse a plain text plan usePlanParser
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 useExecutionEngine
directly. 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
FunctionPackageClient
to add/deleteFunctionPackage
s and thus add/deleteFunction
s 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 interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
-