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

-h command, --help command

Displays help for the specified command, then exits. For example, jsbclientgen -h shows a usage message for the jsbclientgen command.

-u URI

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.

-p TCP-port

Sets the port number only for the StreamBase Server. Useful when the server is localhost and you only need to specify a non-default port, instead of specifying the full URI with the -u option. The default port is 10000.

Note

The -p option is not supported for StreamBase applications that have authentication enabled or are using High Availability features.

--package package-name

Optional. Default to none. Specify a package name in which this class will be generated, such as: jsbclientgen --package com.mycompany --class MyApplication.

-d directory-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 Field of the most recent tuple.

OutputStream

Displays a table of all tuples on OutputStream.

OutputStream@Field

Displays a table of all tuples on OutputStream keyed by the field Field (with the name of the stream appearing “pinned”, sometimes called “sticky”).

FILES

The jsbclientgen command generates a Java source file, class-name.java.

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 –u option. 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 –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 gets NOTICE level messages and higher. Reasonable values are -1, to disable NOTICE messages and only show WARN, ERROR and FATAL messages, 1, which adds INFO messages to the standard messages, and 2, which adds DEBUG messages.

SEE ALSO

sbd
sbadmin
syslog (3)