External adapter commands fall into two categories: those that run on the same host as Studio, and those that run on the same host as the Server.
The discovery commands, x_unixDiscCmd and x_winDiscCmd always run on the Studio host. All other commands run on the Server host.
The Studio and Server are frequently run on the same host, so the development of all command and driving scripts for the custom adapter are straightforward. the configuration becomes more complex during remote execution when Studio and the Server are running on different hosts.
For example, if the Studio is running on a Windows host, and the Server is set up through Studio to execute on a remote Linux host, it implies that the discovery command and the discovery file name that the framework generates are running and are generated in a Windows environment. The path to the discovery file is a Windows-specific path with drive letters and '/' characters used as path separators. In this case, the developer of the connector should write the discovery command to run in a Windows environment while coding all other commands to remotely execute on the Linux box using a user-configured ssh or rsh command.
Command | Description |
---|---|
x_unixCmdConfig x_winCmdConfig |
The configure command should do any required parsing and/or checking of the parameters. It may also convert the parameters into the real format expected by the execution command by reading, parsing, and re-writing the parameter file. If the configure command fails (non-zero return), it is reported as a reset() error, and the adapter fails to start. |
x_unixCmdExec x_winCmdExec |
When the Server starts the adapter, it executes this command with its ending indicating that the connector has finished. |
x_unixCmdStop x_winCmdStop |
The stop command runs from a separate thread; it should stop all processes created with the x_{unix,win}CmdExec command, thus causing the x_{unix,win}CmdExec to return. |
x_unixCmdClean x_winCmdClean |
The clean command runs after the Server has stopped the connection, that is, when x_{unix,win}CmdExec returns. |
x_winDiscCmd |
This command is for schema discovery. It should write a discovery file into the file name passed to it. The parameter -o <temporary disc filename> argument is appended to this command before it is executed. <discover> <table name="table_name_1" /> <column name="col_name_1" type="col_type_1"/> . . . <column name="col_name_k" type="col_type_k"/> </table> . . . <table name="table_name_n" /> <column name="col_name_1" type="col_type_1"/> . . . <column name="col_name_1" type="col_type_1"/> </table> </discover> |