Contents
This sample demonstrates the StreamBase Once adapter, an input adapter that starts up and sends one tuple as output.
-
In the Package Explorer, double-click to open the
Once.sbappapplication. Make sure the application is the currently active tab in the EventFlow Editor. -
Click the
Run button. This opens the SB
Test/Debug perspective and starts the application.
-
The Application Output shows the timestamp tuple that is sent on startup as output, which is similar to the following:
-
When done, press F9 or click the
Stop Running Application button.
The Once adapter cannot be demonstrated using terminal windows, because it sends its
single tuple as soon as the application starts in StreamBase Server. By the time we
might be able to start a dequeue session to see the output on OutputStream1, the single tuple event has already occurred.
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 single project containing the sample files.
By default, the sample files are installed in the following default locations:
- On Windows
-
C:\Program Files\StreamBase Systems\StreamBase.n.m\sample\adapter\embedded\once\ - On UNIX
-
/opt/streambase/sample/adapter/embedded/once/
When you load the sample into StreamBase Studio, Studio copies the sample project's
files to your Studio workspace. StreamBase Systems recommends that you use the
workspace copy of the sample, especially on UNIX, where you may not have write access
to /opt/streambase. In the default installation, the
path to this sample in your Studio workspace is:
UNIX: ~/streambase-studio-n.m-workspace/sample_adapter_embedded_once Windows XP: C:\Documents and Settings\username\My Documents\ StreamBase Studion.mWorkspace\sample_adapter_embedded_once Windows 7 and Windows Vista: C:\Users\username\Documents\StreamBase Studion.mWorkspace\ sample_adapter_embedded_once
