8.3.1 Procedure for executing the sample program for an in-process connection custom adaptor

This subsection explains the procedure for executing the sample program for an in-process connection custom adaptor. Two console windows are used in this procedure. The individual console windows that are used are indicated below in parentheses (( )). Open and run a new console window as needed.

  1. Move to the working directory (console window 1).

    cd working-directory

  2. Copy the entire directory installation-directory\samples\api\, including the sample program, and place it directly under the working-directory (console window 1).
    If you have already built a sample environment directly under the working-directory, this step and step 3 are not required. Proceed to step 4.

    xcopy /EY installation-directory\samples\api .\samples\api\

  3. Copy the sample program's conf directory and its entire contents to the conf directory directly under the working directory (console window 1).
    Any property files that are already in working-directory\conf will be overwritten. If you want to save them, copy them to another directory before you perform this step.

    xcopy /Y samples\api\conf .\conf\

  4. Compile the source files (console window 1).
    The source files must be compiled in an environment in which you can execute the javac command.

    javac# -classpath installation-directory\lib\sdp.jar samples\api\src\samples\Inprocess*.java

    #
    Define the required environment variables before you compile as described in 6.5 Compilation procedure. Alternatively, specify the path for the environment variables in the javac command.

  5. Start the SDP server (console window 1).

    .\bin\sdpstart

  6. Register a query group (streams and queries) (console window 2).
    Open a new console window and move to the working directory.

    cd working-directory

    Then, execute the following command:

    .\bin\sdpcql Inprocess_QueryGroupTest

  7. Start the query group (console window 2).

    .\bin\sdpcqlstart Inprocess_QueryGroupTest

  8. Start the application for in-process connection (console window 2).

    .\bin\sdpstartinpro InprocessAPTest

  9. Check the execution result (console window 1).
    Confirm that the results are displayed in the console window (console window 1) in which you started the SDP server. Since the data reception application in the sample program uses the polling method, the received results ["ad0", 0]-["ad24", 24] are output to the console window.

    Receiver : Tuple Get on FILTER1 [ VAL=ad0, ID=0, TIME=... ]
    :
    Receiver : Tuple Get on FILTER1 [ VAL=ad23, ID=23, TIME=... ]
    Receiver : Tuple Get on FILTER1 [ VAL=ad24, ID=24, TIME=... ]

  10. Stop the application for in-process connection (console window 2).

    .\bin\sdpstopinpro InprocessAPTest

  11. Stop the query group (console window 2).

    .\bin\sdpcqlstop Inprocess_QueryGroupTest

  12. Stop the SDP server (console window 2).

    .\bin\sdpstop