|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoracle.odi.sdk.invocation.OdiInvocation
public class OdiInvocation
Class used for requesting an execution on a remote agent
To request an execution:
1. first create the command using the OdiCommandScenario object:
OdiCommandScenario scenCmd=new OdiCommandScenario(); scenCmd.setScenName("TEST"); scenCmd.setScenVersion("001"); scenCmd.setSyncMode(OdiCommand.SYNC_MODE_SYNCHRONE); scenCmd.setLogLevel(5); scenCmd.setContext("GLOBAL"); ...
OdiRepositoryConnection conn=new OdiRepositoryConnection(); conn.setOdiUser("SUPERVISOR"); conn.setOdiPassword("SUNOPSIS");
conn.setJdbcDriver("oracle.jdbc.driver.OracleDriver"); conn.setJdbcUrl("jdbc:oracle:thin:@ours:1521:ORA9"); conn.setJdbcUser("sa"); conn.setJdbcUrl(""); conn.setWorkRepositoryCode("WORKREP");
OdiInvocation invocation = new OdiInvocation(agentHost,agentPort); OdiInvocationResult result=invocation.invokeCommand(command,conn); if (!result.isOk()) { //process wrong invocation .... } invocation.close();
OdiRepositoryConnection
,
OdiCommand
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_AGENT_HOSTNAME
Default agent host : localhost |
static int |
DEFAULT_AGENT_PORT
Default agent port : 20910 |
Constructor Summary | |
---|---|
OdiInvocation()
Creates an invocation object to request execution on the default agent. |
|
OdiInvocation(java.lang.String pHostName,
int pHostPort)
Creates an invocation object to request execution on a remote agent. |
Method Summary | |
---|---|
void |
close()
Close the connection to the agent. |
OdiInvocationResult |
invokeCommand(OdiCommand pCommand,
OdiRepositoryConnection pConnection)
Launch a command on an agent. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_AGENT_PORT
public static final java.lang.String DEFAULT_AGENT_HOSTNAME
Constructor Detail |
---|
public OdiInvocation(java.lang.String pHostName, int pHostPort) throws java.io.IOException
pHostName
- Agent host name.pHostPort
- Agent listening port.
java.io.IOException
public OdiInvocation() throws java.io.IOException
java.io.IOException
Method Detail |
---|
public OdiInvocationResult invokeCommand(OdiCommand pCommand, OdiRepositoryConnection pConnection)
pCommand
- OdiCommand to run.pConnection
- Repository connection.
public void close()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |