======================================== LiveView Java Client API Samples ======================================== This sample provides simple Java programs in the src/main/java directory that illustrate the LiveView Java Client API. The sample is designed to be loaded into StreamBase Studio, which will automatically compile the Java files. The eleven Java Client samples illustrate different features of the Java Client API: SimpleQuery.java Demonstrates how to use the LiveView Java API to connect to and query a table. QueryWithLiveResult.java Demonstrates a simple query that uses a LiveResult query listener to provide continuous updates. QueryWithFilter.java Demonstrates a query that selects a subset of columns from a table and filters the results using a simple predicate. ConnectAndListTables.java Demonstrates how to connect to a LiveView server and list its tables. DynamicAggregation.java Demonstrates how to create an aggregation query. AdvancedConnect.java Demonstrates the use of a progress monitor listener that reports the progress of connection and disconnection events. MultiConnect.java Demonstrates how to make a LiveViewMultiConnection, which includes failover and automatic reconnection of queries. PublishToTableAndKillPublisher.java Demonstrates how to use LiveVeiw Java API to publish data to a LiveView server and kill the publishers. KillSession.java Demonstrates how to use LiveView Java API to kill the sessions. KillQuery.java Demonstrates how to use LiveView Java API to kill the queries. CreateStartDropTables.java Demonstrates how to use LiveView Java API to create, start and drop dynamic LiveView tables on a LiveVeiw server. Also load the Hello LiveView sample into Studio. This sample provides a simple instance of LiveView where the primary data table, ItemsSales, is automatically filled with a feed simulation. To see the Java client samples work, first run the Hello LiveView sample, then run each Java client individually against the Hello LiveView server. Follow these steps: 1. If you have run the Hello LiveView sample before, and have changed the port on which the sample runs, change it back to the default port, 10000. 2. To run Hello LiveView in Studio, you can: - In the LiveView Project Viewer, click the green Run button in the upper right. - Right-click any of the lvconf table configuration files in the Project Explorer view and select Run As > Run Configurations > Run (in the invoked Run Configurations dialog). - Right-click the project folder itself, and select Run As > LiveView Fragment Wait for a message in the Console view that begins "All tables have been loaded..." 3. In the sample_lv-java-clientapi project in Studio, open the src/main/java folder and open each Java file in turn. Studio silently compiles each file automatically. 4. With the SimpleQuery.java file loaded and currently active in Studio, right-click anywhere in the Editor canvas, and from the context menu, select Run As > Java Application. A new Console view opens to show the results of the SimpleQuery program's query against the HelloLiveView server. 5. Do the same for each Java file in turn. Switch between Console view windows by means of the drop-down arrow next to the Display Selected Console button on the right side of the Console view's toolbar. Close a terminated Console view window with the red X button. To run the Hello LiveView sample from the command line outside of Studio, for purposes of running the Java client samples as explained above, you must: - Package this sample's LiveView fragment project into a fragment archive. - Create a separate StreamBase Application project, and set the pom.xml for that project to depend on the fragment archive created in the previous step. - Create a separate StreamBase Application archive file. - Install that archive into a StreamBase Runtime node. - Start the node. These steps are described in more detail in the "Deploy with epadmin" page of the Concepts Overview in the StreamBase documentation.