Contents
This sample demonstrates the use of the TIBCO StreamBase® Input and Monitoring Adapters for Exegy.
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.
-
In the Package Explorer view, double-click
ExegySample.sbapp
. -
Select the adapter icon to open the Properties view for the adapter.
-
Select the Connection Properties tab and enter values for Exegy Server Host, Login Username, and Login Password.
-
Click the Run button. This opens the SB Test/Debug perspective and starts the application.
-
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. -
In the Manual Input view, select the
Admin
input stream, enterconnect
in thecommand
field, and click . An additional tuple appears in the Application Output view from theStatus
stream indicating the adapter has connected to the Exegy server. -
In the Manual Input view, select the
Subscribe
input stream, entersubscribe
,US:N:IBM
,level_one
, andequity
in thecommand
,symbol
,subscriptionType
, andcontainerType
fields, respectively, then optionally add values for PassThru and maxQuoteRate and click . A tuple appears in the Application Output view from theStatus
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 theEquities
stream. -
In the Manual Input view, again in the
Subscribe
input stream, enterunsubscribe
in thecommand
field, leave the remaining fields unchanged, and click . A tuple appears in the Application Output view from theStatus
stream indicating the unsubscribe request has been processed, and the flow of tuples from theEquities
stream stops. -
When done, press F9 or click the Stop Running Application button.
In StreamBase Studio, import this sample with the following steps:
-
From the top menu, click
→ . -
Select this sample from the Embedded Input Adapters list.
-
Click OK.
StreamBase Studio creates a project for this sample.
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.