jsbclientgen
StreamBase Java Client Generation — Generates a simple Java dequeue client for the StreamBase application
SYNOPSIS
jsbclientgen [OPTIONS] [STREAM [OutputStream.Field] | [OutputStream] |
[OutputStream@Field] ...]
DESCRIPTION
jsbclientgen generates a simple Java dequeue client for the running StreamBase application, creating a read-only display interface for one or more Output Streams. If no Output Streams were specified on the command line, data is displayed from up to five (5) streams. Different forms of the stream options allow you to control the way dequeued data is displayed in the generated client.
If authentication is enabled for this application, the jsbclientgen command requires SBUser privilege.
Here is a sequence of example commands. First we start the server for our StreamBase application: sbd myapp.sbapp &; Next we enter the command that will generate a Java client source for the running application; jsbclientgen --class MyDequeueClient; To compile and run the application, we enter commands such as: javac --classpath 'sbconfig --classpath' MyDequeueClient; java MyDequeueClient; With the dequeue client running, we can start a feed simulation in a different terminal window, to send test data to the application and view the dequeued results in the generated client. For example: sbfeedsim myconfig.sbfs.
OPTIONS
-
-hcommand,--helpcommand -
Displays help for the specified command, then exits. For example,
jsbclientgen -hshows a usage message for the jsbclientgen command. -
-uURI -
Sets the URI of the StreamBase Server. The default is
sb://localhost:10000/. The URI for the StreamBase Server may also be set using the STREAMBASE_SERVER environment variable. See the sburi page of the Reference Guide (or see sburi(5) at the UNIX shell prompt) for a discussion of the URI format and its shortcuts. -
-pTCP-port -
Sets the port number only for the StreamBase Server. Useful when the server is
localhostand you only need to specify a non-default port, instead of specifying the full URI with the-uoption. The default port is10000.Note
The
-poption is not supported for StreamBase applications that have authentication enabled or are using High Availability features. -
--packagepackage-name -
Optional. Default to none. Specify a package name in which this class will be generated, such as: jsbclientgen --package com.mycompany --class MyApplication.
-
-ddirectory-name -
Optional. Defaults to none. Use this option to specify a directory, such as src for the client's source file.
-
--version -
Prints version information and exits.
COMMAND OPTIONS
-
STREAM -
Allows you to specify one or more Output Streams in the StreamBase application. If no Output Streams were specified on the jsbclientgen command line, data is displayed from up to five (5) streams. If streams were specified, the format that you use on the command line determines how the generated client displays the data. For each stream, you can use the following options in any preferred combination (one format type per stream):
-
OutputStream.Field -
Displays the value of the field
Fieldof the most recent tuple. -
OutputStream -
Displays a table of all tuples on
OutputStream. -
OutputStream@Field -
Displays a table of all tuples on
OutputStreamkeyed by the fieldField(with the name of the stream appearing “pinned”, sometimes called “sticky”).
ENVIRONMENT
-
STREAMBASE_SERVER -
Optional. Contains the URI for a StreamBase Server instance. Use this variable to set a default StreamBase URI for StreamBase commands that take the
–uoption. If set, commands use the URI in this variable, overriding their built-in default URI, which issb://localhost:10000.If this variable is set, you must use the –u option to communicate with any server other than the one specified in this variable. See the sburi page in the Reference Guide for more on StreamBase URIs. -
STREAMBASE_RETITLE_TERMINALS -
Optional. If set to any value, StreamBase programs assign a terminal window title to match the name of the executable being run. By default, terminal titles are not affected.
-
STREAMBASE_LOG_LEVEL -
Optional. Sets the minimum severity of messages that StreamBase will write to syslog or stderr. Default is
0, which getsNOTICElevel messages and higher. Reasonable values are-1, to disableNOTICEmessages and only showWARN,ERRORandFATALmessages,1, which addsINFOmessages to the standard messages, and2, which addsDEBUGmessages.
