public final class RuntimeAgent
extends java.lang.Object
This class represents the execution engine, or "local agent". It offers all the methods to execute agent operations locally.
It can interact with only one OdiInstance
, the one passed in the constructor.
The best practice is to have only one RuntimeAgent by OdiInstance.
Constructor and Description |
---|
RuntimeAgent(OdiInstance pOdiInstance,
java.lang.String pOdiUser,
char[] pPassword)
Constructs a RuntimeAgent object.
|
Modifier and Type | Method and Description |
---|---|
WorkRepositoryInfo |
cleanStaleSessions()
Clean the stale sessions present in the work repository.
|
oracle.odi.runtime.agent.IAgentCredentialProvider |
getCredentialProvider() |
java.lang.String |
getExecutionName()
Returns the Agent name that will appear in the execution log for a startScenario operation.
|
oracle.odi.runtime.agent.exec.ISessionInformation |
getSessionInformation() |
java.util.List |
getSessionStatus(java.util.List pSessionIds)
Returns the sessions status.
|
void |
initializeDataServer(java.lang.Number pDataServerId,
java.util.Properties pInitProps)
Initialize a data server as defined in the topology.
|
ExecutionInfo |
restartSession(long pSessionId,
StartupParams pVariables,
boolean pSynchronous)
Deprecated.
Since 11.1.1.6.0. Instead use
restartSession(long, StartupParams, boolean, Integer) |
ExecutionInfo |
restartSession(long pSessionId,
StartupParams pVariables,
boolean pSynchronous,
boolean pKeepSessionParams)
Deprecated.
Since 11.1.1.6.0. Instead use
restartSession(long, StartupParams, boolean, boolean, Integer) |
ExecutionInfo |
restartSession(long pSessionId,
StartupParams pVariables,
boolean pSynchronous,
boolean pKeepSessionParams,
java.lang.Integer pLogLevel)
Restart the given session with various parameters.
|
ExecutionInfo |
restartSession(long pSessionId,
StartupParams pVariables,
boolean pSynchronous,
java.lang.Integer pLogLevel)
Restart the given session with various parameters.
|
ExecutionInfo |
startScenario(java.lang.String pScenName,
java.lang.String pScenVersion,
StartupParams pVariables,
java.lang.String pKeywords,
java.lang.String pContextCode,
java.lang.Integer pLogLevel,
java.lang.String pSessionName,
boolean pSynchronous)
Start the scenario with various parameters.
|
void |
stopSession(long pSessionId,
oracle.odi.runtime.agent.invocation.StopType pStopType)
Kill the session described by the parameters.
|
void |
testDataServer(java.lang.Number pDataServerId) |
void |
testDataServer(java.lang.Number pDataServerId,
StartupParams pGlobalVariables) |
void |
testDataServer(java.lang.Number pDataServerId,
StartupParams pGlobalVariables,
java.lang.String pTransactionId)
Tests a data server as defined in the topology.
|
void |
testDataServer(java.lang.Number pDataServerId,
java.lang.String pTransactionId) |
public RuntimeAgent(OdiInstance pOdiInstance, java.lang.String pOdiUser, char[] pPassword)
pOdiInstance
- the odiInstance to which the RuntimeAgent
is linked. Cannot be null.pOdiUser
- the name of ODI user you want to use to connect to ODI to execute your operations.pPassword
- the password NOT encodedpublic void stopSession(long pSessionId, oracle.odi.runtime.agent.invocation.StopType pStopType)
pSessionId
- the id of the session to stoppStopType
- the type of stop operation to performpublic ExecutionInfo restartSession(long pSessionId, StartupParams pVariables, boolean pSynchronous)
restartSession(long, StartupParams, boolean, Integer)
pSessionId
- identifier of the session to restartpVariables
- start up parameters for this session execution. Redefine the values for the session variables.pSynchronous
- indicates whether the execution should be synchronous.public ExecutionInfo restartSession(long pSessionId, StartupParams pVariables, boolean pSynchronous, java.lang.Integer pLogLevel)
pSessionId
- identifier of the session to restartpVariables
- start up parameters for this session execution. Redefine the values for the session variables.pSynchronous
- indicates whether the execution should be synchronous.pLogLevel
- is logging level for restarting session. If null, log level is retrieved from the previous run of this session.public ExecutionInfo restartSession(long pSessionId, StartupParams pVariables, boolean pSynchronous, boolean pKeepSessionParams)
restartSession(long, StartupParams, boolean, boolean, Integer)
pSessionId
- identifier of the session to restartpVariables
- start up parameters for this session execution. Redefine the values for the session variables.pSynchronous
- indicates whether the execution should be synchronous.pKeepSessionParams
- if a session variable value is not redefined in pVariables, then if pKeepSessionParams is true then the value used in the last execution will be re-used.public ExecutionInfo restartSession(long pSessionId, StartupParams pVariables, boolean pSynchronous, boolean pKeepSessionParams, java.lang.Integer pLogLevel)
pSessionId
- identifier of the session to restartpVariables
- start up parameters for this session execution. Redefine the values for the session variables.pSynchronous
- indicates whether the execution should be synchronous.pKeepSessionParams
- if a session variable value is not redefined in pVariables, then if pKeepSessionParams is true then the value used in the last execution will be re-used.pLogLevel
- is logging level for restarting session. If null, log level is retrieved from the previous run of this session.public ExecutionInfo startScenario(java.lang.String pScenName, java.lang.String pScenVersion, StartupParams pVariables, java.lang.String pKeywords, java.lang.String pContextCode, java.lang.Integer pLogLevel, java.lang.String pSessionName, boolean pSynchronous)
pScenName
- the name of the scenario to run. Must not be null or empty.pScenVersion
- the version of the scenario to run. Must not be empty. If null or -1, the last version of the scenario will be run.pVariables
- start up parameters used for the execution of this scenariopKeywords
- keywords used for the execution of this scenariopContextCode
- the context in which this scenario will be executedpLogLevel
- logging level for this scenario execution. If null, default is 5pSessionName
- the name to give to the sessions that will be created. If null, the scenario name will be used.pSynchronous
- indicates whether the scenario execution should be synchronouspublic void testDataServer(java.lang.Number pDataServerId, StartupParams pGlobalVariables, java.lang.String pTransactionId)
pDataServerId
- the data server identifier. Must not be null.pGlobalVariables
- List of global variables (for substitution if used in connection definition)pTransactionId
- Used to identify if OnConnect/OnDisconnect command need to be executed on the conneciton as part of the test.public void testDataServer(java.lang.Number pDataServerId, java.lang.String pTransactionId)
public void testDataServer(java.lang.Number pDataServerId, StartupParams pGlobalVariables)
public void testDataServer(java.lang.Number pDataServerId)
public void initializeDataServer(java.lang.Number pDataServerId, java.util.Properties pInitProps) throws InvocationException
pDataServerId
- the data server identifier. Must not be null.pInitProps
- additional properties, if any, for the initialization operations. May pass in null if none.InvocationException
public WorkRepositoryInfo cleanStaleSessions()
WorkRepositoryInfo
public java.util.List getSessionStatus(java.util.List pSessionIds) throws InvocationException
pSessionIds
- a list of sessions to check.SessionStatusInfo
for the session ids passed as parameterInvocationException
public java.lang.String getExecutionName()
public oracle.odi.runtime.agent.exec.ISessionInformation getSessionInformation()
public oracle.odi.runtime.agent.IAgentCredentialProvider getCredentialProvider()