Exegy Adapter Sample

This sample demonstrates the use of the TIBCO StreamBase® Input and Monitoring Adapters for Exegy.

Exegy Middleware Dependencies

The StreamBase Exegy adapter relies on version 3.5.0 or later of the JAR file that implements the Exegy Client API, XCAPI.jar. This file is supplied as part of your Exegy installation and is not shipped with StreamBase. If you get an error message whose text refers to NoClassDefFoundError: com/exegy/xcapi/XCException, make sure this JAR file is locatable by the adapter on the path specified in the CLASSPATH environment variable.

The StreamBase Exegy adapter also relies on version 3.5.0 or later of the native library that implements the Exegy Client API, libjnixcapi64.so on Linux and jnixcapi64.DLL on Windows. This file is supplied as part of your Exegy installation and is not shipped with StreamBase. If you get an error message whose text refers to Failed to load Java XCAPI library (jnixcapi64), make sure this file is locatable by the adapter on the path specified in the LD_LIBRARY_PATH environment variable on Linux or in the PATH environment variable on Windows.

The Exegy API implementation described in this section is a product of a third party, and its specifications and file names are subject to change by Exegy. See your Exegy documentation for the latest information.

Running This Sample in StreamBase Studio

  1. In the Package Explorer view, double-click ExegySample.sbapp.

  2. Select the adapter icon to open the Properties view for the adapter.

  3. Select the Connection Properties tab and enter values for Exegy Server Host, Login Username, and Login Password.

  4. Click the Run button. This opens the SB Test/Debug perspective and starts the application.

  5. In the Test/Debug Perspective, open the Application Output view. Observe a tuple on the Dictionary stream containing a list of tuples, one for each field in the Exegy dictionary.

  6. In the Manual Input view, select the Admin input stream, enter connect in the command field, and click Send Data. An additional tuple appears in the Application Output view from the Status stream indicating the adapter has connected to the Exegy server.

  7. In the Manual Input view, select the Subscribe input stream, enter subscribe, US:N:IBM, level_one, and equity in the command, symbol, subscriptionType, and containerType fields, respectively, then optionally add values for PassThru and maxQuoteRate and click Send Data. A tuple appears in the Application Output view from the Status stream indicating the subscription request has been processed, followed by a series of refresh (XC_MESSAGE_TYPE=0), quote (2), and trade (3) tuples on the Equities stream.

  8. In the Manual Input view, again in the Subscribe input stream, enter unsubscribe in the command field, leave the remaining fields unchanged, and click Send Data. A tuple appears in the Application Output view from the Status stream indicating the unsubscribe request has been processed, and the flow of tuples from the Equities stream stops.

  9. When done, press F9 or click the Stop Running Application button.

Importing This Sample into StreamBase Studio

In StreamBase Studio, import this sample with the following steps:

  • From the top menu, click FileLoad StreamBase Sample.

  • Select this sample from the Embedded Input Adapters list.

  • Click OK.

StreamBase Studio creates a project for this sample.

Sample Location

When you load the sample into StreamBase Studio, Studio copies the sample project's files to your Studio workspace, which is normally part of your home directory, with full access rights.

Important

Load this sample in StreamBase Studio, and thereafter use the Studio workspace copy of the sample to run and test it, even when running from the command prompt.

Using the workspace copy of the sample avoids permission problems. The default workspace location for this sample is:

studio-workspace/sample_exegy

See Default Installation Directories for the default location of studio-workspace on your system.

In the default TIBCO StreamBase installation, this sample's files are initially installed in:

streambase-install-dir/sample/exegy

See Default Installation Directories for the default location of studio-workspace on your system.