CORBA SAMPLE CODE: STATION MONITOR

INTRODUCTION

The Station Monitor example shows off a simple CORBA client/server interactions.  It supports two scenarios.  In the first scenario, a Java applet talks to a back-end server object called the "station".  In the second scenario, a Java client application receives callbacks from an intermediary object called the "collector" who periodically polls running stations and passes information to the client.
All objects in this example are written in Java.  Batch files have been provided for running and building the example on Windows NT.  However, the example can still be manually built and run on any UNIX workstation running the Enterprise Server.


TABLE OF CONTENTS

 

STATION MONITOR DESIGN

SCENARIO

The Station Monitor example is based around the concept of a manufacturing station.  Imagine a factory that produces widgets using an assembly line.  The assembly line is composed of a series of work stations, each of which accomplishes some small part of the manufacturing process by taking parts from an input bin, doing something to them, and putting the result into an output bin.  The output bin would then becomes the input bin for the next station down the line.  Each station has different operational characteristics which can be tracked over time, such as the number of parts in the input or output bins, the rate at which parts are processed, and so forth.

This code example implements a simple station monitor applet that is capable of monitoring the status of a single station, and a standalone Java application that monitors multiple stations at once.

CORBA OBJECTS

Station

Collector

Single-Station Display Applet

Multiple-Station Display Client


RUNNING THE STATION MONITOR

PRE-REQUISITES
The Station Monitor example comes pre-compiled, so you don't need to build it in order to run it.  However, you must have the following:
On the Enterprise Server Machine: On the Client Machine (Perhaps the same machine as the server machine) STARTING STATIONS AND THE COLLECTOR
Before you can run either the Single-Station Monitor applet or the Multi-Station Monitor client, you have to start the collector (for the multi-station case) and one or more stations.  A batch file has been provided that will automatically start  the collector and two default stations ("StationR" and "StationT"): SINGLE STATION DISPLAYAPPLET
To run the single-station display applet: MULTIPLE STATION MONITOR CLIENT (COMMAND-LINE)
To start the multiple-station monitor client:

BUILDING THE STATION MONITOR

PRE-REQUISITES
To build the station monitor example, you will need to have the following: FILE AND DIRECTORY STRUCTURE
The station monitor example has the following directory structure: BUILDING
Three DOS batch files have been created to help you build the sample code. Once you have your environment set-up according to the above pre-requisites, do the following to build the example code:

REFERENCE

CREDITS DOCUMENTATION BATCH FILE SOURCES