StreamBase Java Client Generation — Generates a simple Java dequeue client for the running StreamBase application
STREAM [OutputStream.Field] | [OutputStream] | [OutputStream@Field] ...]
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 are specified on the command line, data is displayed from up to five 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 level.
Here is a sequence of example commands. First, start the server for your StreamBase application:
sbd myapp.sbapp & UNIX start sbd myapp.sbapp Windows
Next, enter the command to generate a Java source file for a client dequeuing from the running application:
jsbclientgen --class MyDequeueClient
To compile and run the client application, enter commands like the following for UNIX:
javac -cp `sb-config --classpath` MyDequeueClient java MyDequeueClient
The equivalent commands for Windows are:
sb-config --classpath --setenv javac MyDequeueClient.java java MyDequeueClient
With the dequeue client running, 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:
Optional. Defaults to none. Use this option to specify a directory such as
java-srcfor the location of the generated source file.
Displays usage text, then exits.
Specifies a system property setting or other JVM argument to be passed to the JVM that runs this jsbclientgen command. Use this option to specify temporary settings that affect only the current invocation of jsbclientgen. You must specify multiple
-Joptions to specify multiple JVM arguments.
There must be no space after the
-J. For example, specify
-J-Xmx2G. Use the full option syntax for
jvm-optionthat you would use at the Java command line, including the initial hyphen. For example, specify
-J-Dstreambase.log-level=2to increase the log level for this invocation of jsbclientgen.
jvm-optionargument might require surrounding quotes, depending on the characters it contains and the shell you are using. However, do not use quotes to escape the spaces between separate JVM arguments; instead use separate
-Joptions. For example:
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 is
-poption is not supported for applications that have StreamBase authentication enabled (because there is no way to specify a username and password) or in conjunction with the multiple URI syntax.
Optional. Defaults to none. Specifies a package name in which this class will be generated, such as:
jsbclientgen --package com.example.sbclient --class MyApplication
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.
Prints version information and exits.
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):
Displays the value of the field
Fieldof the most recent tuple.
Displays a table of all tuples on
Displays a table of all tuples on
OutputStreamkeyed by the field
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 is
sb://localhost:10000.If this variable is set, you must use the
-uoption 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.
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.
Optional. Sets the minimum severity of messages that StreamBase writes to logging output. Default is 0, which gets NOTICE level messages and higher. Reasonable values are -1 (which disables NOTICE messages and shows only WARN, ERROR and FATAL messages), 1 (which adds INFO messages to the standard messages), and 2 (which adds DEBUG messages).