Contents
The TIBCO LiveView® Ready adapter informs a StreamBase application when the configured LiveView server is ready to accept connections, and when it changes to not ready.
At runtime, ready and not ready events on the specified LiveView server result in a tuple emitted on the adapter's output port.
This section describes the properties you can set for this adapter, using the various tabs of the Properties view for the adapter's icon in StreamBase Studio.
Name: Use this field to specify or change the component's name, which must be unique in the application. The name must contain only alphabetic characters, numbers, and underscores, and no hyphens or other special characters. The first character must be alphabetic or an underscore.
Adapter Name: A read-only field that shows the formal name of the adapter.
Class: A field that shows the fully qualified class name that implements the functionality of this adapter. Use this class name when loading the adapter in StreamSQL programs with the APPLY JAVA statement. You can right-click this field and select Copy from the context menu to place the full class name in the system clipboard.
Start with application: If this field is set to Yes or a module parameter that evaluates to true, an instance of this adapter starts as part of the containing StreamBase Server. If this field is set to No or a module parameter that evaluates to false, the adapter is loaded with the server, but does not start until you send an sbadmin resume command, or start the component with StreamBase Manager. With this option No or false, the adapter does not start even if the application as a whole is suspended and later resumed. The recommended setting is selected by default.
Enable Error Output Port: Select this check box to add an Error Port to this component. In the EventFlow canvas, the Error Port shows as a red output port, always the last port for the component. See Using Error Ports and Error Streams to learn about Error Ports.
Description: Optionally enter text to briefly describe the component's purpose and function. In the EventFlow canvas, you can see the description by pressing Ctrl while the component's tooltip is displayed.
This section describes the properties on the Adapter Properties tab in the Properties view for the LiveView Ready adapter.
Property | Description |
---|---|
Set Server URI to encapsulating LiveView | Select this check box when the adapter is part of a LiveView project. In this case, the adapter connects to the port of the
running LiveView server. When authentication is enabled, the credentials used to connect to the LiveView server are retrieved
from the liveview.internal.username and liveview.internal.password system properties. The corresponding LiveView user must be configured with the appropriate permissions to allow this adapter
to perform its operations.
|
LiveView Server URI | A LiveView server URI, or an expression or variable that resolves to a LiveView server URI. For example, the URI for the local
machine and default port is lv://localhost:10080 .
|
Log Level | Controls the level of verbosity the adapter uses to send notifications to the console. This setting can be higher than the containing application's log level. If set lower, the system log level is used. Available values, in increasing order of verbosity, are: OFF, ERROR, WARN, INFO, DEBUG, TRACE, and ALL. |
Use the Concurrency tab to specify parallel regions for this instance of this component, or multiplicity options, or both. The Concurrency tab settings are described in Concurrency Options, and dispatch styles are described in Dispatch Styles.
Caution
Concurrency settings are not suitable for every application, and using these settings requires a thorough analysis of your application. For details, see Execution Order and Concurrency, which includes important guidelines for using the concurrency options.
The LiveView Ready adapter has a status port that supplies information about the configured server status.
As with other StreamBase adapters and operators, you can optionally enable an Error Output Port, as described in Using Error Ports and Error Streams.
The LiveView Ready adapter has one output status port. For each server-up or server-down event, one or more tuples are emitted on the status port. The message type is always CONNECTION, while the Action field reports the status of the server.
The status port has the fields shown in the following table:
Field | Data Type | Description | ||||
---|---|---|---|---|---|---|
Type | string | The basic state reported, currently always:
|
||||
Object | string | The name on the EventFlow canvas of the adapter reporting the status. | ||||
Action | string | The action that occurred, always one of the following:
|
||||
Message | string | A human-readable string that provides additional context for the status message, including the URI of the LiveView server. | ||||
Time | timestamp | The time the readiness event occurred. |
Add an instance of the adapter to a new EventFlow application with the following steps:
-
In StreamBase Studio, create a project, including an empty StreamBase EventFlow application file to host the adapter.
-
From the Operators and Adapters drawer of the Palette view, drag the Adapters, Java Operators icon to the canvas. This opens the Insert an Operator or Adapter dialog.
-
In the search field, type a string such as
liveview
to narrow the list of adapters. Select the icon for the LiveView Ready adapter, then click . -
Double-click the adapter's icon and select the Adapter Properties tab in the Properties view.
-
Next, either:
-
If this adapter is part of an EventFlow module that is itself part of a LiveView project, select the Set Server URI to encapsulating LiveView check box. This check box tells the adapter to connect to the host and port for the current project's LiveView server.
-
Or specify the URI for a local or remote LiveView server to connect to (or accept the default URI,
lv:/localhost:10080
).
-
-
Add an Output Stream and connect an arc to it from the LiveView Ready adapter's output port.
-
At runtime, ready and not ready events on the specified LiveView server result in a tuple emitted on the adapter's output port.
The LiveView Ready adapter uses typecheck messages to help you configure the adapter.
The adapter generates warning messages at runtime under various conditions, including: The configured LiveView server is not available.
When suspended, the adapter stays connected to the LiveView server; therefore, on resume the adapter is still connected.