Skip navigation links

Oracle® Data Integrator Java API Reference
11g Release 1 (11.1.1.6.0)

E17060-03


oracle.odi.runtime.agent
Class RuntimeAgent

java.lang.Object
  extended by oracle.odi.runtime.agent.RuntimeAgent


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.

Since:
11.1.1.3.0

Constructor Summary
RuntimeAgent(OdiInstance pOdiInstance, java.lang.String pOdiUser, char[] pPassword)
          Constructs a RuntimeAgent object.

 

Method Summary
 WorkRepositoryInfo cleanStaleSessions()
          Clean the stale sessions present in the work repository.
 java.lang.String getExecutionName()
          Returns the Agent name that will appear in the execution log for a startScenario operation.
 java.util.List<SessionStatusInfo> getSessionStatus(java.util.List<java.lang.Long> pSessionIds)
          Returns the sessions status.
 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, 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)
           

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

RuntimeAgent

public RuntimeAgent(OdiInstance pOdiInstance,
                    java.lang.String pOdiUser,
                    char[] pPassword)
Constructs a RuntimeAgent object.
Parameters:
pOdiInstance - the odiInstance to which the RuntimeAgent is linked. Cannot be null.
If the instance is not linked to a work repository, only testDataServer method will work.
pOdiUser - the name of ODI user you want to use to connect to ODI to execute your operations.
pPassword - the password NOT encoded

Method Detail

stopSession

public void stopSession(long pSessionId,
                        StopType pStopType)
Kill the session described by the parameters. The instance you used to instantiate this RuntimeAgent must be connected to a work repository to execute this method.
Only the sessions that have been started by this RuntimeAgent instance can be stopped.
Parameters:
pSessionId - the id of the session to stop
pStopType - the type of stop operation to perform

restartSession

public ExecutionInfo restartSession(long pSessionId,
                                    StartupParams pVariables,
                                    boolean pSynchronous)
Deprecated. Since 11.1.1.6.0. Instead use restartSession(long, StartupParams, boolean, Integer)
Restart the given session with various parameters. The instance you used to instantiate this RuntimeAgent must be connected to a work repository to execute this method.
Only sessions in status ERROR and WAITING can be restarted.
If a variable value is not redefined in pVariables, then the last execution value will be used.
Parameters:
pSessionId - identifier of the session to restart
pVariables - start up parameters for this session execution. Redefine the values for the session variables.
pSynchronous - indicates whether the execution should be synchronous.
Returns:
informations on the execution

restartSession

public ExecutionInfo restartSession(long pSessionId,
                                    StartupParams pVariables,
                                    boolean pSynchronous,
                                    java.lang.Integer pLogLevel)
Restart the given session with various parameters. The instance you used to instantiate this RuntimeAgent must be connected to a work repository to execute this method.
Only sessions in status ERROR and WAITING can be restarted.
If a variable value is not redefined in pVariables, then the last execution value will be used.
Parameters:
pSessionId - identifier of the session to restart
pVariables - 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.
Returns:
informations on the execution
Since:
11.1.1.6.0.

restartSession

public 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)
Restart the given session with various parameters. The instance you used to instantiate this RuntimeAgent must be connected to a work repository to execute this method. Only sessions in status ERROR and WAITING can be restarted.
Parameters:
pSessionId - identifier of the session to restart
pVariables - 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.
if pKeepSessionParams is false, then the default value of the variable will be used for this restart.
Returns:
informations on the execution

restartSession

public ExecutionInfo restartSession(long pSessionId,
                                    StartupParams pVariables,
                                    boolean pSynchronous,
                                    boolean pKeepSessionParams,
                                    java.lang.Integer pLogLevel)
Restart the given session with various parameters. The instance you used to instantiate this RuntimeAgent must be connected to a work repository to execute this method. Only sessions in status ERROR and WAITING can be restarted.
Parameters:
pSessionId - identifier of the session to restart
pVariables - 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.
if pKeepSessionParams is false, then the default value of the variable will be used for this restart.
pLogLevel - is logging level for restarting session. If null, log level is retrieved from the previous run of this session.
Returns:
informations on the execution
Since:
11.1.1.6.0

startScenario

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)
Start the scenario with various parameters. The instance you used to instantiate this RuntimeAgent must be connected to a work repository to execute this method.
Parameters:
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 scenario
pKeywords - keywords used for the execution of this scenario
pContextCode - the context in which this scenario will be executed
pLogLevel - logging level for this scenario execution. If null, default is 5
pSessionName - 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 synchronous
Returns:
information on the execution

testDataServer

public void testDataServer(java.lang.Number pDataServerId,
                           StartupParams pGlobalVariables,
                           java.lang.String pTransactionId)
Tests a data server as defined in the topology.
Parameters:
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.
Since:
11.1.1.5.0

testDataServer

public void testDataServer(java.lang.Number pDataServerId,
                           java.lang.String pTransactionId)
Since:
11.1.1.5.0

testDataServer

public void testDataServer(java.lang.Number pDataServerId,
                           StartupParams pGlobalVariables)
Since:
11.1.1.5.0

testDataServer

public void testDataServer(java.lang.Number pDataServerId)

cleanStaleSessions

public WorkRepositoryInfo cleanStaleSessions()
Clean the stale sessions present in the work repository.
Returns:
WorkRepositoryInfo

getSessionStatus

public java.util.List<SessionStatusInfo> getSessionStatus(java.util.List<java.lang.Long> pSessionIds)
                                                   throws InvocationException
Returns the sessions status.
Parameters:
pSessionIds - a list of sessions to check.
Returns:
a list of SessionStatusInfo for the session ids passed as parameter
Throws:
InvocationException

getExecutionName

public java.lang.String getExecutionName()
Returns the Agent name that will appear in the execution log for a startScenario operation.
Returns:
the Agent name that will appear in the execution log for a startScenario operation. Caution: This agent name does not correspond to a logical or physical agent in the topology. This parameter does not enable to run a session on a remote agent. This field is only set through the startScen.sh tool.

Skip navigation links

Oracle® Data Integrator Java API Reference
11g Release 1 (11.1.1.6.0)

E17060-03


Copyright © 2011, Oracle and/or its affiliates. All rights reserved.