summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/tests/AVStreams/server_discovery
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/tests/AVStreams/server_discovery')
-rw-r--r--TAO/orbsvcs/tests/AVStreams/server_discovery/Makefile87
-rw-r--r--TAO/orbsvcs/tests/AVStreams/server_discovery/Queue.java189
-rw-r--r--TAO/orbsvcs/tests/AVStreams/server_discovery/README189
-rw-r--r--TAO/orbsvcs/tests/AVStreams/server_discovery/Server_0005fDiscovery_0005fUtil.h71
-rw-r--r--TAO/orbsvcs/tests/AVStreams/server_discovery/Server_Discovery.cpp282
-rw-r--r--TAO/orbsvcs/tests/AVStreams/server_discovery/Server_Discovery.java133
-rw-r--r--TAO/orbsvcs/tests/AVStreams/server_discovery/Server_Discovery_Browser.java141
-rw-r--r--TAO/orbsvcs/tests/AVStreams/server_discovery/Server_Discovery_Perf.java133
-rw-r--r--TAO/orbsvcs/tests/AVStreams/server_discovery/Server_Discovery_Selection.java199
-rw-r--r--TAO/orbsvcs/tests/AVStreams/server_discovery/Server_Discovery_Util.java29
-rw-r--r--TAO/orbsvcs/tests/AVStreams/server_discovery/Strip_Chart.java188
-rw-r--r--TAO/orbsvcs/tests/AVStreams/server_discovery/Trader_Client.cpp311
-rw-r--r--TAO/orbsvcs/tests/AVStreams/server_discovery/Trader_Client.h126
-rw-r--r--TAO/orbsvcs/tests/AVStreams/server_discovery/graph02.gifbin231 -> 0 bytes
-rw-r--r--TAO/orbsvcs/tests/AVStreams/server_discovery/graph09.gifbin343 -> 0 bytes
-rw-r--r--TAO/orbsvcs/tests/AVStreams/server_discovery/main.cpp74
-rw-r--r--TAO/orbsvcs/tests/AVStreams/server_discovery/mmedia3.gifbin321 -> 0 bytes
-rw-r--r--TAO/orbsvcs/tests/AVStreams/server_discovery/server01.gifbin342 -> 0 bytes
-rw-r--r--TAO/orbsvcs/tests/AVStreams/server_discovery/server02.gifbin268 -> 0 bytes
-rw-r--r--TAO/orbsvcs/tests/AVStreams/server_discovery/www1.gifbin348 -> 0 bytes
20 files changed, 0 insertions, 2152 deletions
diff --git a/TAO/orbsvcs/tests/AVStreams/server_discovery/Makefile b/TAO/orbsvcs/tests/AVStreams/server_discovery/Makefile
deleted file mode 100644
index 3d3b46ce47d..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/server_discovery/Makefile
+++ /dev/null
@@ -1,87 +0,0 @@
-#----------------------------------------------------------------------------
-# $Id$
-#
-# Makefile for TAO
-#----------------------------------------------------------------------------
-shared_libs_only=1
-MAKEFILE = Makefile
-LIBNAME = libavdemo
-SHLIB = $(LIBNAME).$(SOEXT)
-
-BIN = main
-
-IDL_SRCS= Video_Repository
-
-IDL_FILES = \
- $(addsuffix S, $(IDL_SRCS)) \
- $(addsuffix C, $(IDL_SRCS))
-
-SRCS = $(IDL_FILES) \
- Trader_Client \
- Server_Discovery
-
-FILES = $(SRCS)
-
-ifndef TAO_ROOT
-TAO_ROOT = $(ACE_ROOT)/TAO
-endif
-
-LSRC = $(addsuffix .cpp,$(FILES))
-
-LDFLAGS += -L$(JAVA_ROOT)/jre/lib/sparc -L$(JAVA_ROOT)/jre/lib/sparc/native_threads
-
-LIBS = -lorbsvcs -lTAO -lACE
-LDLIBS = -lavdemo -ljava -ljvm
-VLDLIBS = $(LDLIBS:%=%$(VAR))
-CPPFLAGS += -I$(JAVA_ROOT)/include -I$(JAVA_ROOT)/include/solaris \
- -I$(TAO_ROOT)/orbsvcs -I$(TAO_ROOT) $(TSS_ORB_FLAG)
-
-BUILD = TAO_VR.module $(VSHLIB) $(VLIB) $(VBIN)
-
-#----------------------------------------------------------------------------
-# Include macros and targets
-#----------------------------------------------------------------------------
-
-include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
-include $(ACE_ROOT)/include/makeinclude/macros.GNU
-include $(TAO_ROOT)/rules.tao.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
-include $(TAO_ROOT)/taoconfig.mk
-
-#----------------------------------------------------------------------------
-# Local targets (and local hacks)
-#----------------------------------------------------------------------------
-
-idl_stubs: $(addsuffix .h, $(IDL_FILES))
-
-Video_Repository.idl: $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/server/Video_Repository.idl
- cp $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/server/Video_Repository.idl .
-
-TAO_VR.module: Video_Repository.idl
- $(JAVA_ROOT)/bin/idltojava Video_Repository.idl
- touch TAO_VR.module
-
-clean:
- -/bin/rm -rf *.o Log $(BIN) obj.* core Templates.DB .make.state
-
-realclean: clean
- -/bin/rm -rf $(addsuffix .h, $(IDL_FILES)) $(addsuffix .i, $(IDL_FILES)) $(addsuffix .cpp, $(IDL_FILES)) \
- $(addsuffix _T.h, $(IDL_FILES)) $(addsuffix _T.i, $(IDL_FILES)) $(addsuffix _T.cpp, $(IDL_FILES))
-
-IDL_EXT=C.h C.i C.cpp S.h S.i S.cpp S_T.h S_T.i S_T.cpp
-
-.PRECIOUS: $(foreach file, $(IDL_SRCS), $(foreach ext, $(IDL_EXT), $(file)$(ext))))
-
-#----------------------------------------------------------------------------
-# Dependencies
-#----------------------------------------------------------------------------
-
-# DO NOT DELETE THIS LINE -- g++dep uses it.
-# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-
-
-# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/TAO/orbsvcs/tests/AVStreams/server_discovery/Queue.java b/TAO/orbsvcs/tests/AVStreams/server_discovery/Queue.java
deleted file mode 100644
index 5387d5dd0c8..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/server_discovery/Queue.java
+++ /dev/null
@@ -1,189 +0,0 @@
-// $Id$
-
-import java.util.Enumeration;
-
-public class Queue
-{
- // Friendly?
- Queue_Node head_ = null;
- Queue_Node tail_ = null;
-
- private int length_ = 0;
-
- public Queue()
- {
- }
-
- public Enumeration forward_iterator()
- {
- return new Queue_Iterator(this, Queue_Iterator.FORWARD);
- }
-
- public Enumeration reverse_iterator()
- {
- return new Queue_Iterator(this, Queue_Iterator.REVERSE);
- }
-
- public void enqueue_tail(Object new_data)
- {
- Queue_Node new_node = new Queue_Node(new_data);
-
- if (tail_ == null)
- {
- tail_ = new_node;
- head_ = new_node;
- }
- else
- {
- new_node.prev_ = tail_;
- tail_.next_ = new_node;
- tail_ = new_node;
- }
-
- length_++;
- }
-
- public void enqueue_head(Object new_data)
- {
- Queue_Node new_node = new Queue_Node(new_data);
-
- if (head_ == null)
- {
- tail_ = new_node;
- head_ = new_node;
- }
- else
- {
- new_node.next_ = head_;
- head_.prev_ = new_node;
- head_ = new_node;
- }
-
- length_++;
- }
-
- public Object dequeue_head()
- {
- Object return_value = null;
-
- if (head_ == null)
- return_value = null;
- else if (tail_ == head_)
- {
- return_value = head_.data_;
- tail_ = null;
- head_ = null;
- }
- else
- {
- return_value = head_.data_;
- head_ = head_.next_;
- head_.prev_ = null;
- }
-
- length_--;
-
- return return_value;
- }
-
- public Object dequeue_tail()
- {
- Object return_value = null;
-
- if (tail_ == null)
- return_value = null;
- else if (tail_ == head_)
- {
- return_value = tail_.data_;
- tail_ = null;
- head_ = null;
- }
- else
- {
- return_value = tail_.data_;
- tail_ = tail_.prev_;
- tail_.next_ = null;
- }
-
- length_--;
-
- return return_value;
- }
-
- public int length()
- {
- return length_;
- }
-
- public Object head()
- {
- if (head_ != null)
- return head_.data_;
- else
- return null;
- }
-
- public Object tail()
- {
- if (tail_ != null)
- return tail_.data_;
- else
- return null;
- }
-}
-
-class Queue_Node
-{
- public Queue_Node prev_ = null;
- public Queue_Node next_ = null;;
- public Object data_;
-
- public Queue_Node(Object data)
- {
- data_ = data;
- }
-}
-
-class Queue_Iterator implements Enumeration
-{
- public static final boolean FORWARD = true;
- public static final boolean REVERSE = false;
-
- private Queue queue_;
- private Queue_Node queue_ptr_;
- private boolean direction_ = FORWARD;
-
- public Queue_Iterator(Queue queue)
- {
- queue_ = queue;
- queue_ptr_ = queue.head_;
- }
-
- public Queue_Iterator(Queue queue, boolean direction)
- {
- queue_ = queue;
- direction_ = direction;
-
- if (direction_)
- queue_ptr_ = queue_.head_;
- else
- queue_ptr_ = queue_.tail_;
- }
-
- public Object nextElement()
- {
- Object data = queue_ptr_.data_;
-
- if (direction_)
- queue_ptr_ = queue_ptr_.next_;
- else
- queue_ptr_ = queue_ptr_.prev_;
-
- return data;
- }
-
- public boolean hasMoreElements()
- {
- return queue_ptr_ != null;
- }
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/server_discovery/README b/TAO/orbsvcs/tests/AVStreams/server_discovery/README
deleted file mode 100644
index ef0a7af2cea..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/server_discovery/README
+++ /dev/null
@@ -1,189 +0,0 @@
-Greetings, person designated to complete the AVDemo!,
-
-This document details my design for the AVDemo, just how far I got in
-implementing those designs, and what remains to be done. First, let me
-explain that I had originally intended to use the JavaIDL ORB for this
-demo, but their implementation of demarshalling Anys tossed
-CORBA::Unknown and NullPointer exceptions like a sailor tossing
-cookies in a typhoon. So then, I figured I could use the VisiBroker
-for Java ORB, while continuing to use the nifty jdk1.2 GUI extensions
---- the "swing" components --- which I had already begun to
-incorporate into the demo. However, in this latest version of the JDK,
-the system classes are located automatically, and their path is not
-required in the CLASSPATH environment variable. Since the Java CORBA
-package names are standardized, I couldn't arrange the package search
-order so that the VisiBroker packages were searched before the JavaIDL
-ones. Conflicts occurred.
-
-At this point, frustrated and dejected, I renounced Java ORBS
-entirely, and decided to implement the client interaction using C++
-TAO while keeping the GUI using Java1.2, and have the GUI invoke
-native methods when it needed to fetch information from the Trading
-Service. If you're unfamiliar with the Java Native Interface (JNI),
-now's the time to get familiar, since this demo relies heavily on it,
-but I'll give you a brief synopsis. In the Java code you declare
-methods as native by prefixing the declaration with the 'native'
-keyword. Once you've compiled the Java source into byte code, you run
-the 'javah' program to generate C/C++ function declarations. The names
-of this functions are the product of name mangling the Java methods,
-so the Java Runtime can call "dlsym" to retrieve a pointer to the
-function's implementation when the native method is invoked in Java
-code. At some point prior to invoking the native method, your Java
-code must explicitly load the shared library in which your native
-method implementations reside by calling System.loadLibrary (). Of
-course, when I attempted to load the shared library contating my
-TAO Trading Service client code, Java threw an
-UnsatisfiedLinkException, not because it couldn't locate the library
-as the misleading error message reported, but for some mysterious
-reason which Carlos suspects has something to do with the native TAO
-threads clashing with the Java VM's user-level threads. (In retropsect
-I could have enabled native threads which seem to be supported in
-Java1.2 for Solaris, but what I came up with is a more elgant design
-anyway). After trying various hacks, I settled on the following
-design. Brace yourself....
-
-DEMO VISION
-
-My goals for this first demo were modest. And became increasingly more
-modest as I began meeting failure at every door. My full intentions
-are described in my thesis (doc/papers/ugthesis_seth), but since I can
-already sense your guffawing at the notion of reading my thesis, I'll
-summarize for you -- right now. Essentially, I wanted the initial query
-to the Trading Service to be as productive as possible, eliminating
-the possibility that attempting to connect to a server in the returned
-offers will fail. Thus, that initial query will should include things
-like: can accept another connection, supports the media formats
-understood by the client, can transmit at a rate suitable to the
-client's limiting bandwidth. Moreover, the client might want to limit
-the pool of possible servers based on content --- must have movies of
-a certain category --- or server performance --- must have a load less
-than 2.4. This kind of configuration information can be obtained
-through dialogue boxes in the GUI, and then formatted as a constraint
-string in the OMG Standard Constraint language. The results ---
-performance properties and movie offerings for each server --- would
-be displayed in the GUI, and the user would nominate a server who
-offers the best performance for the content desired by the user.
-
-DEMO REALITY --- the Server Side
-
-orbsvcs/tests/AVStreams/mpeg/source/server contains the code for the
-augmented server --- augmented from the original server because it
-uses the TAO_Property_Exporter to form a service offer that it exports
-to a Trading Service instance. Properties exported by the
-augmented_server include: maxmimum number of connections allowed,
-current number of connections, list of movies offered and their
-attributes, performance statistics (CPU usage, disk usage, load,
-etc...). The TAO_Property_Exporter presents a kind of uniform
-interface for exporting static and dynamic properties --- every
-property mentioned above is dynamic except perhaps the maximum number
-of connections allowed. There are actually three types of properties
-exportable by Property_Exporter: static, where the value of the
-property is stored twice: once in the offer and once in the MMDevice's
-CosProperty::PropertySet; semi-dynamic, where the value of the
-property is stored in the property set, and a dynamic property in the
-service offer retrieves the value from the property set (this is
-useful for MMDevice dynamic properties); and dynamic, where the value
-of the property isn't stored anywhere, but lazily-evaluated by a
-dynamic property in the offer (this is useful for non-MMDevice
-properties).
-
-Classes that export properties via the TAO_Property_Exporter inherit
-from the TAO_Exportable interface. The define_properties and
-export_properties methods allow an exporting class to encapsulate the
-exporting of its own properties. The augmented server has three
-TAO_Exportable classes representing three categories of properties: 1)
-The AV_Audio_MMDevice exports those properties that are also
-properties of the MMDevice --- properties that are used in the
-lower-level AVStream stream establishment negotiation. The properties
-are static and semi-dynamic. Hence when its define_properties method
-is invoked, the AV_Audio_MMDevice adds to the Service Type Description
-PropStructSeq, the names, types, and modes of each of the properties
-its exporting. When its define_properties method is invoked, the
-AV_Audio_MMDevice uses the TAO_Property_Exporter reference it's passed
-to export its properties. 2) TAO_Video_Repository in addition to being
-a TAO_Exportable is also a TAO_Dynamic_Property. In define_properties
-is exports itself as a dynamic property with the TAO_Property_Exporter
-its passed, and when called back, parses a manifest of available
-movies, obtains information about them by parsing the headers of each
-of the media files, and returns this information of a sequence of
-structs, each struct containing the attributes of an individual
-movie. The IDL code for this structure --- TAO_VR::Movie --- can be
-found in VideoRepository.idl. 3) TAO_Machine_Properties is also a
-dynamic property --- serveral actually. For each of the ten or so
-performance properties, it exports a dynamic property with itself as
-the evaluation interface reference. When its evalDP method is called,
-it obtains the value for the statistic whose name is in the prop_name
-parameter. The statistics are gathered by SunRPC from the rstatd
-daemon and cached. The cache expires every so often and is then
-refreshed by another rpc call, obviating the need for an rpc call for
-every call to evalDP.
-
-DEMO REALITY --- the Client Side
-
-The Server Selection portion of the demo is actually a Java VM
-embedded in a TAO Trading Service client. The main program bootstraps
-the vm, initializes the ORB and bootstraps to the Trading Service,
-performs the initial query of the Trading Service, and invokes the
-'main' method on the Java Server_Discovery class. Embedding the VM in
-this way is possible because of the JNI Invocation interface. On the
-C++ side of things, the Trader_Client class queries the Trading
-Service and caches the results in a two-tier hashtable: the first tier
-maps the server name to who the offer belongs to a second-tier
-hashtable, which maps each property name in the offer to its
-value. The Server_Discovery.cpp file implements each of the native
-methods used in the java portion of the demo, and each method
-implementation follows the same pattern: convert the java string
-paraemters into C++ strings, obtain the Trader_Client singleton
-instance, delegate to that instance, and convert the return results to
-Java objects.
-
-The Server_Discovery class creates a JFrame with a JDesktopPane as its
-ContentPane. The first window onto the Desktop is a
-Server_Discovery_Selection pane which it split (JSplitPane) into two
-halves: the upper portion containing a hierarcical menu (JTree) of
-available movies, organized by category, title, and server; and the
-bottom portion containing a table (JTable) of attributes for a selected
-movie. The Server_Discovery class uses the native methods in
-Server_Discovery_Util, get_server_names and get_movie_info, to supply
-Server_Discovery_Selection with the information necessary to create
-its displays. When a user clicks on a leaf node of the hierarchical
-menuthe bottom half displays the table for that
-server's movie offering. The table displays the contents of
-TAO_VR::Movie structure for the selected movies. Also in the tables
-are clickable labels to display the performance information for the
-server, and to call up a web page describing the movie.
-
-For viewing the performance a Server_Discovery_Perf JInternalFrame is
-created in a callback to the Server_Discovery (a Mediator object). The
-Server_Discovery_Perf is supplied with the names of each of the
-performance properties, instantiates a Strip_Chart for each one, and
-spawns a thread to periodically update each chart by calling
-Server_Discovery_Util.evaluate_performance_property for the chart's
-property_name. For viewing a web page describing the movie, the
-Server_Discovery_Browser, when given the description field of the
-TAO_VR::Movie structure, will load a JEditorPane to fetch the page and
-display the parsed html! Pretty damn slick. The "browser" will also
-respond to clicks on hyperlinks and fetch the selected pages! No joke!
-
-Finally, if the user clicks on the button at the bottom of the
-selection frame, Server_Discovery_Selection calls the native method
-load_movie, which uses a UNIX socket to connect to the controller
-process of the AV client, and passes it the name of the movie and the
-IOR of the MMDevice interface. The AV client then transmutes the IOR
-to an MMDevice object reference, and establishes the AV
-stream. Hoorah!
-
-WHAT'S WRONG WITH THE DEMO?
-
-Well, the first native method invocation --- get_server_names ---
-works as verified by ACE_DEBUG messages, but hangs on returning from
-it. Once this problem is solved, all that remains is to ensure the GUI
-looks and works as I've envisioned, and to code the interaction between
-the Server Discovery and A/V client.
-
-That, my friend, is the demo in an anxiously written nutshell. Enjoy!
-Don't forget to set the JAVA_ROOT enivronment variable to the location
-of the lastest JDK version (when I was here, that was
-/project/doc/pkg/jdk1.2beta4)!
-
--- Seth Widoff, sbw1@cs.wustl.edu \ No newline at end of file
diff --git a/TAO/orbsvcs/tests/AVStreams/server_discovery/Server_0005fDiscovery_0005fUtil.h b/TAO/orbsvcs/tests/AVStreams/server_discovery/Server_0005fDiscovery_0005fUtil.h
deleted file mode 100644
index 94efd7c114d..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/server_discovery/Server_0005fDiscovery_0005fUtil.h
+++ /dev/null
@@ -1,71 +0,0 @@
-// ========================================================================
-// $Id$
-//
-// = FILENAME
-// Server_0005fDiscovery_0005fUtil.h
-//
-// = AUTHOR
-// javah <javah@cs.wustl.edu>
-//
-// ========================================================================
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class Server_0005fDiscovery_0005fUtil */
-
-#ifndef _Included_Server_0005fDiscovery_0005fUtil
-#define _Included_Server_0005fDiscovery_0005fUtil
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: Server_0005fDiscovery_0005fUtil
- * Method: evaluate_performance_property
- * Signature: (Ljava/lang/String;Ljava/lang/String;)F
- */
-JNIEXPORT jfloat JNICALL Java_Server_1Discovery_1Util_evaluate_1performance_1property
- (JNIEnv *, jclass, jstring, jstring);
-
-/*
- * Class: Server_0005fDiscovery_0005fUtil
- * Method: get_movie_info
- * Signature: (Ljava/lang/String;)[LTAO_VR/Movie;
- */
-JNIEXPORT jobjectArray JNICALL Java_Server_1Discovery_1Util_get_1movie_1info__Ljava_lang_String_2
- (JNIEnv *, jclass, jstring);
-
-/*
- * Class: Server_0005fDiscovery_0005fUtil
- * Method: get_servers
- * Signature: ()[Ljava/lang/String;
- */
-JNIEXPORT jobjectArray JNICALL Java_Server_1Discovery_1Util_get_1servers
- (JNIEnv *, jclass);
-
-/*
- * Class: Server_0005fDiscovery_0005fUtil
- * Method: init
- * Signature: ([Ljava/lang/String;)I
- */
-JNIEXPORT jint JNICALL Java_Server_1Discovery_1Util_init
- (JNIEnv *, jclass, jobjectArray);
-
-/*
- * Class: Server_0005fDiscovery_0005fUtil
- * Method: load_movie
- * Signature: (Ljava/lang/String;Ljava/lang/String;)V
- */
-JNIEXPORT void JNICALL Java_Server_1Discovery_1Util_load_1movie
- (JNIEnv *, jclass, jstring, jstring);
-
-/*
- * Class: Server_0005fDiscovery_0005fUtil
- * Method: query_trader
- * Signature: ()V
- */
-JNIEXPORT void JNICALL Java_Server_1Discovery_1Util_query_1trader
- (JNIEnv *, jclass);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/TAO/orbsvcs/tests/AVStreams/server_discovery/Server_Discovery.cpp b/TAO/orbsvcs/tests/AVStreams/server_discovery/Server_Discovery.cpp
deleted file mode 100644
index 28a472c801a..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/server_discovery/Server_Discovery.cpp
+++ /dev/null
@@ -1,282 +0,0 @@
-// ========================================================================
-// $Id$
-//
-// = FILENAME
-// Server_Discovery.cpp
-//
-// = AUTHOR
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// ========================================================================
-
-#include "Server_0005fDiscovery_0005fUtil.h"
-#include "Trader_Client.h"
-
-ACE_RCSID(server_discovery, Server_Discovery, "$Id$")
-
-// Since we're doing C-like function calls here, let's throw in some
-// global variables for good measure.
-
-//static const char* LIBRARY_NAME = "libtclient.so";
-//static const char* FACTORY_NAME = "create_trader_client";
-static jclass _movie_class;
-static jfieldID _name_id, _filename_id, _category_id, _description_id;
-
-// Static function declarations:
-//void print_dlerror (void);
-
-/*
- * Class: Server_0005fDiscovery_0005fUtil
- * Method: evaluate_performance_property
- * Signature: (Ljava/lang/String;Ljava/lang/String;)F
- */
-JNIEXPORT jfloat JNICALL
-Java_Server_1Discovery_1Util_evaluate_1performance_1property
-(JNIEnv *env,
- jclass this_class,
- jstring java_server_name,
- jstring java_prop_name)
-{
- jfloat return_value = 0.0;
-
- Trader_Client* trader_client = Trader_Client::instance ();
- if (trader_client != 0)
- {
- const char* server_name = env->GetStringUTFChars (java_server_name, 0);
- const char* prop_name = env->GetStringUTFChars (java_prop_name, 0);
-
- return_value =
- trader_client->evaluate_performance_property (server_name, prop_name);
-
- env->ReleaseStringUTFChars (java_server_name, server_name);
- env->ReleaseStringUTFChars (java_prop_name, prop_name);
- }
-
- return return_value;
-}
-
-/*
- * Class: Server_0005fDiscovery_0005fUtil
- * Method: get_movie_info
- * Signature: (Ljava/lang/String;)[LTAO_VR/Movie;
- */
-JNIEXPORT jobjectArray JNICALL
-Java_Server_1Discovery_1Util_get_1movie_1info__Ljava_lang_String_2
-(JNIEnv * env,
- jclass this_class,
- jstring java_server_name)
-{
- fprintf (stderr, "Server_Discover: get movie info.\n");
- jobjectArray return_value = 0;
-
- Trader_Client* trader_client = Trader_Client::instance ();
- if (trader_client != 0)
- {
- // Get a Movie_Iterator that will iterate over the
- // movie_structures for all movies of the given server.
- const char* server_name = env->GetStringUTFChars (java_server_name, 0);
- Movie_Iterator* movie_iter = trader_client->get_movie_info (server_name);
-
- if (movie_iter != 0)
- {
- // Allocate a new array of structures.
- int length = movie_iter->num_movies (), i = 0;
- jobject initial_object = env->AllocObject (_movie_class);
- return_value = env->NewObjectArray (length, _movie_class, initial_object);
- env->DeleteLocalRef (initial_object);
-
- for (; movie_iter->has_more_elements (); movie_iter->advance (), i++)
- {
- // For each movie structure, convert the C++ strings
- // into java strings, and set them in the structure.
- jobject movie_struct = env->AllocObject (_movie_class);
- jstring name = env->NewStringUTF (movie_iter->name ());
- jstring filename = env->NewStringUTF (movie_iter->filename ());
- jstring category = env->NewStringUTF (movie_iter->category ());
- jstring description = env->NewStringUTF (movie_iter->description ());
- env->SetObjectField (movie_struct, _name_id, name);
- env->SetObjectField (movie_struct, _filename_id, filename);
- env->SetObjectField (movie_struct, _category_id, category);
- env->SetObjectField (movie_struct, _description_id, description);
- env->SetObjectArrayElement (return_value, i, movie_struct);
- env->DeleteLocalRef (movie_struct);
- }
-
- delete movie_iter;
- }
-
- env->ReleaseStringUTFChars (java_server_name, server_name);
- }
-
- return return_value;
-}
-
-/*
- * Class: Server_0005fDiscovery_0005fUtil
- * Method: get_servers
- * Signature: ()[Ljava/lang/String;
- */
-JNIEXPORT jobjectArray JNICALL
-Java_Server_1Discovery_1Util_get_1servers (JNIEnv *env, jclass this_class)
-{
- fprintf (stderr, "Server Discovery: get servers.\n");
- jobjectArray server_names = 0;
-
- Trader_Client* trader_client = Trader_Client::instance ();
- if (trader_client != 0)
- {
- int length = 0;
- char** server_names_str = 0;
- trader_client->get_servers (length, server_names_str);
-
- if (length > 0)
- {
- ACE_DEBUG ((LM_DEBUG, "Converting to java strings.\n"));
- // Create an array of Java strings, suitable for returning
- // to the Java invoker.
- jstring initial_string = env->NewStringUTF ("");
- jclass string_class = env->FindClass ("java/lang/String");
- jobjectArray server_names =
- env->NewObjectArray (length, string_class, initial_string);
-
- // Convert those C++ strings into Java Strings.
- for (int i = 0; i < length; i++)
- {
- const char* server_name = server_names_str[i];
- ACE_DEBUG ((LM_DEBUG, "Converting %s to a java string.\n", server_name));
- jstring java_server_name = env->NewStringUTF (server_name);
-
- ACE_DEBUG ((LM_DEBUG, "Placing %s in the return array.\n", server_name));
- env->SetObjectArrayElement (server_names, i, java_server_name);
-
- ACE_DEBUG ((LM_DEBUG, "Deleting a reference to the java string.\n"));
- env->DeleteLocalRef (java_server_name);
- }
- }
-
- ACE_DEBUG ((LM_DEBUG, "Deleting the array of C++ server name strings.\n"));
- delete [] server_names_str;
- }
-
- return server_names;
-}
-
-/*
- * Class: Server_0005fDiscovery_0005fUtil
- * Method: load_movie
- * Signature: (Ljava/lang/String;Ljava/lang/String;)V
- */
-JNIEXPORT void JNICALL
-Java_Server_1Discovery_1Util_load_1movie (JNIEnv * env,
- jclass this_class,
- jstring java_server_name,
- jstring java_movie_name)
-{
- Trader_Client* trader_client = Trader_Client::instance ();
- if (trader_client != 0)
- {
- const char* server_name = env->GetStringUTFChars (java_server_name, 0);
- const char* movie_name = env->GetStringUTFChars (java_movie_name, 0);
- trader_client->load_movie (server_name, movie_name);
- env->ReleaseStringUTFChars (java_server_name, server_name);
- env->ReleaseStringUTFChars (java_movie_name, movie_name);
- }
-}
-
-/*
- * Class: Server_0005fDiscovery_0005fUtil
- * Method: query_trader
- * Signature: ()V
- */
-JNIEXPORT void JNICALL
-Java_Server_1Discovery_1Util_query_1trader (JNIEnv *env, jclass this_class)
-{
- Trader_Client* trader_client = Trader_Client::instance ();
- if (trader_client != 0)
- trader_client->query_trader ();
-}
-
-/*
- * Class: Server_0005fDiscovery_0005fUtil
- * Method: init
- * Signature: ()V
- */
-/*
-void print_dlerror (void)
-{
- const char* error_msg = ::dlerror ();
- if (error_msg != 0)
- {
- ::fprintf (stderr, "Horrors of horrors! Dynamic linking failed "
- "for the following reason: %s\n", error_msg);
- }
- else
- ::fprintf (stderr, "Horrors of horrors! Dynamic linking failed.\n");
-}
-
-JNIEXPORT jint JNICALL
-Java_Server_1Discovery_1Util_init (JNIEnv * env,
- jclass this_class,
- jobjectArray args)
-{
- // Explicitly dynamically link to the Trader_Client library and
- // obtain a pointer to its factory global function.
- ::fprintf (stderr, "Attempting to open trader client library.\n");
- void* handle = ::dlopen (LIBRARY_NAME, RTLD_NOW);
-
- if (handle != 0)
- {
- ::fprintf (stderr, "Attempting to resolve factory function.\n");
- Trader_Client* (*factory) (void) =
- (Trader_Client* (*) (void)) ::dlsym (handle, FACTORY_NAME);
-
- if (factory != 0)
- {
- ::fprintf (stderr, "Invoking factory method.\n");
- _trader_client = factory ();
- }
- else
- ::print_dlerror ();
- }
- else
- ::print_dlerror ();
-
- int return_value = 0;
- if (_trader_client != 0)
- {
- int argc = env->GetArrayLength (args);
- char** argv = new char*[argc];
-
- // Pull the command line args into C++ format from the java format.
- for (int i = 0; i < argc; i++)
- {
- jstring arg = static_cast<jstring> (env->GetObjectArrayElement (args, i));
- argv[i] = const_cast<char*> (env->GetStringUTFChars (arg, 0));
- env->DeleteLocalRef (arg);
- }
-
- _trader_client->init (argc, argv);
-
- // Release the allocated command line arguments.
- for (i = 0; i < argc; i++)
- {
- jstring arg = static_cast<jstring> (env->GetObjectArrayElement (args, i));
- env->ReleaseStringUTFChars (arg, argv[i]);
- env->DeleteLocalRef (arg);
- }
-
- // Init some global variables
- jclass movie_class = env->FindClass ("TAO_VR/Movie");
- _movie_class = static_cast<jclass> (env->NewGlobalRef (movie_class));
- _name_id = env->GetFieldID (movie_class, "name_", "Ljava/lang/String;");
- _filename_id = env->GetFieldID (movie_class, "filename_", "Ljava/lang/String;");
- _category_id = env->GetFieldID (movie_class, "category_", "Ljava/lang/String;");
- _description_id = env->GetFieldID (movie_class, "description_", "Ljava/lang/String;");
-
- delete [] argv;
- return_value = 0;
- }
-
- return return_value = -1;
-}
-*/
diff --git a/TAO/orbsvcs/tests/AVStreams/server_discovery/Server_Discovery.java b/TAO/orbsvcs/tests/AVStreams/server_discovery/Server_Discovery.java
deleted file mode 100644
index 54d8afaaac4..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/server_discovery/Server_Discovery.java
+++ /dev/null
@@ -1,133 +0,0 @@
-// ========================================================================
-// $Id$
-//
-// = FILENAME
-// Server_Discovery.java
-//
-// = AUTHOR
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// ========================================================================
-
-import java.awt.*;
-import java.awt.event.*;
-import java.beans.*;
-import com.sun.java.swing.*;
-import Server_Discovery_Util;
-import Server_Discovery_Selection;
-
-
-public class Server_Discovery extends JFrame
-{
- private static final Integer DOCLAYER = new Integer(5);
- private static final Integer TOOLLAYER = new Integer(6);
- private static final Integer HELPLAYER = new Integer(7);
-
- private JMenuBar menu_bar_;
- private JDesktopPane desktop_;
- private Server_Discovery_Selection movies_selector_ =
- new Server_Discovery_Selection (this);
-
- public Server_Discovery ()
- {
- super ("Server Discovery");
-
- final int inset = 50;
- Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
- this.setBounds (inset, inset, screenSize.width - inset*2, screenSize.height - inset*2);
-
- // Ok, as grotesque as these anonymous classes are, they do have
- // their uses.
- WindowAdapter window_adapter =
- new WindowAdapter ()
- {
- public void windowClosing (WindowEvent e)
- {
- System.exit (0);
- }
- };
-
- this.addWindowListener (window_adapter);
- this.desktop_ = new JDesktopPane ();
- this.getContentPane ().add (this.desktop_);
-
- this.desktop_.add (this.movies_selector_, DOCLAYER);
- try
- {
- System.out.println ("Compiling movies...");
- this.compile_movies ();
- this.movies_selector_.setSelected (true);
- }
- catch (java.beans.PropertyVetoException e2) {}
- }
-
- // Mediator callback methods.
- public void display_performance (String movie_name, String host_name)
- {
- Server_Discovery_Perf doc = new Server_Discovery_Perf (host_name);
-
- doc.add_dynamic_property ("CPU");
- doc.add_dynamic_property ("Disk");
- doc.add_dynamic_property ("Pages");
- doc.add_dynamic_property ("Swaps");
- doc.add_dynamic_property ("Packets");
- doc.add_dynamic_property ("errors");
- doc.add_dynamic_property ("switches");
- doc.add_dynamic_property ("collisions");
- doc.add_dynamic_property ("interrupts");
- doc.add_dynamic_property ("load");
-
- this.desktop_.add (doc, DOCLAYER);
-
- try
- {
- doc.setSelected (true);
- }
- catch (java.beans.PropertyVetoException e2) {}
- }
-
- public void load_page (String url)
- {
- Server_Discovery_Browser doc = new Server_Discovery_Browser (url);
- this.desktop_.add (doc, DOCLAYER);
-
- try
- {
- doc.setSelected (true);
- }
- catch (java.beans.PropertyVetoException e2) {}
-
- }
-
- private void compile_movies ()
- {
- // Add the movies to the list.
- System.out.println ("Getting a list of servers.");
- String[] host_names = Server_Discovery_Util.get_servers ();
-
- System.out.println ("Number of server names returned: " + host_names.length);
- for (int i = 0; i < host_names.length; i++)
- {
- System.out.println ("Getting movies for server " + host_names[i]);
- TAO_VR.Movie[] movies =
- Server_Discovery_Util.get_movie_info (host_names[i]);
-
- System.out.println ("Adding movies for server " + host_names[i]);
- for (int j = 0; j < movies.length; j++)
- {
- System.out.println ("Adding movie: " + movies[j].name_);
- this.movies_selector_.add_movie (host_names[i], movies[j]);
- }
- }
- }
-
- public static void main (String[] args)
- {
- System.loadLibrary ("avdemo");
-
- System.out.println ("Launching the Server Discovery frame.");
- JFrame frame = new Server_Discovery ();
- frame.setVisible (true);
- }
-}
-
diff --git a/TAO/orbsvcs/tests/AVStreams/server_discovery/Server_Discovery_Browser.java b/TAO/orbsvcs/tests/AVStreams/server_discovery/Server_Discovery_Browser.java
deleted file mode 100644
index 8a0172cb453..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/server_discovery/Server_Discovery_Browser.java
+++ /dev/null
@@ -1,141 +0,0 @@
-import com.sun.java.swing.*;
-import java.awt.*;
-import java.net.URL;
-import java.net.MalformedURLException;
-import java.io.*;
-import com.sun.java.swing.text.*;
-import com.sun.java.swing.event.*;
-
-public class Server_Discovery_Browser
- extends JInternalFrame
-{
- public Server_Discovery_Browser (String initial_url)
- {
- super ("Movie Description", true, true, true, true);
-
- HtmlPane html = new HtmlPane (initial_url);
- this.setBounds (200, 25, 400, 400);
- this.getContentPane ().add (html);
- }
-
- public void pack()
- {
- Dimension size = getPreferredSize ();
- this.setSize (size.width, size.height);
- }
-}
-
-// This code was liberated from the jfc demo "Metalworks", which is
-// included with the jdk 1.2 beta 3 distribution.
-class HtmlPane
- extends JPanel
- implements HyperlinkListener
-{
- JEditorPane html_;
-
- public HtmlPane (String initial_url)
- {
- this.setLayout( new BorderLayout() );
-
- try
- {
- URL url = new URL (initial_url);
- this.html_ = new JEditorPane (initial_url);
- this.html_.setEditable (false);
- this.html_.addHyperlinkListener (this);
- }
- catch (Exception excp)
- {
- System.err.println (excp);
- }
-
- JScrollPane scroller = new JScrollPane ();
- JViewport vp = scroller.getViewport ();
- vp.add (this.html_);
- this.add (scroller, BorderLayout.CENTER);
- }
-
- /**
- * Notification of a change relative to a
- * hyperlink.
- */
- public void hyperlinkUpdate (HyperlinkEvent e)
- {
- if (e.getEventType () == HyperlinkEvent.EventType.ACTIVATED)
- {
- this.linkActivated (e.getURL ());
- }
- }
-
- /**
- * Follows the reference in an
- * link. The given url is the requested reference.
- * By default this calls <a href="#setPage">setPage</a>,
- * and if an exception is thrown the original previous
- * document is restored and a beep sounded. If an
- * attempt was made to follow a link, but it represented
- * a malformed url, this method will be called with a
- * null argument.
- *
- * @param u the URL to follow
- */
- protected void linkActivated (URL u)
- {
- Cursor c = this.html_.getCursor ();
- Cursor waitCursor = Cursor.getPredefinedCursor (Cursor.WAIT_CURSOR);
- this.html_.setCursor (waitCursor);
- SwingUtilities.invokeLater (new PageLoader(u, c));
- }
-
- /**
- * temporary class that loads synchronously (although
- * later than the request so that a cursor change
- * can be done).
- */
- class PageLoader implements Runnable
- {
- PageLoader (URL u, Cursor c)
- {
- this.url_ = u;
- this.cursor_ = c;
- }
-
- public void run ()
- {
- if (this.url_ == null)
- {
- // restore the original cursor
- html_.setCursor (this.cursor_);
-
- // PENDING(prinz) remove this hack when
- // automatic validation is activated.
- Container parent = html_.getParent ();
- parent.repaint ();
- }
- else
- {
- Document doc = html_.getDocument ();
- try
- {
- html_.setPage (this.url_);
- }
- catch (IOException ioe)
- {
- html_.setDocument (doc);
- getToolkit ().beep ();
- }
- finally
- {
- // schedule the cursor to revert after
- // the paint has happended.
- this.url_ = null;
- SwingUtilities.invokeLater (this);
- }
- }
- }
-
- URL url_;
- Cursor cursor_;
- }
-}
-
diff --git a/TAO/orbsvcs/tests/AVStreams/server_discovery/Server_Discovery_Perf.java b/TAO/orbsvcs/tests/AVStreams/server_discovery/Server_Discovery_Perf.java
deleted file mode 100644
index aa88b9da559..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/server_discovery/Server_Discovery_Perf.java
+++ /dev/null
@@ -1,133 +0,0 @@
-import java.awt.*;
-import com.sun.java.swing.*;
-import com.sun.java.swing.event.*;
-import java.util.*;
-import Strip_Chart;
-
-public class Server_Discovery_Perf
- extends JInternalFrame
- implements Runnable
-{
- private static final int HSPACE = 10;
- private static final int VSPACE = 10;
- private static final int MAX_WIDTH = 5;
- private static final int MAX_HEIGHT = 5;
- private static final int GRAPH_DIMENSION = 175;
-
- private boolean continue_ = true;
- private JPanel[] graph_panels_ = new JPanel[MAX_HEIGHT];
- private Hashtable props_ = new Hashtable ();
- private String server_name_ = null;
- // Vector containing each of the dynamic properties we will
- // periodically poll for their status.
-
- class Prop_Struct
- {
- public String dp_;
- public Strip_Chart graph_;
-
- public Prop_Struct (String dp, Strip_Chart graph)
- {
- this.dp_ = dp;
- this.graph_ = graph;
- }
- }
-
- public Server_Discovery_Perf (String server_name)
- {
- super (server_name, true, true, true, true);
- this.setSize (MAX_WIDTH*(GRAPH_DIMENSION + HSPACE), GRAPH_DIMENSION);
- this.setLocation (375, 15);
- this.server_name_ = server_name;
-
- // Create each of the five graph rows.
- this.setLayout (new GridLayout (5, 1, HSPACE, 0));
- FlowLayout panel_layout = new FlowLayout (FlowLayout.CENTER, 0, VSPACE);
- for (int i = 0; i < MAX_HEIGHT; i++)
- {
- this.graph_panels_[i] = new JPanel ();
- this.graph_panels_[i].setLayout (panel_layout);
- this.getContentPane ().add (this.graph_panels_[i]);
- }
-
- // When the frame closes, end the graph updating.
- this.addInternalFrameListener (new InternalFrameAdapter ()
- {
- public void internalFrameClosing (InternalFrameEvent event)
- {
- cease_updates ();
- }
- }
- );
- }
-
- public void add_dynamic_property (String prop_name)
- {
- Prop_Struct ps = new Prop_Struct (prop_name, new Strip_Chart (prop_name));
- this.props_.put (prop_name, ps);
-
- int num_graphs = this.props_.size ();
- int row_panel_index = num_graphs % MAX_HEIGHT;
- this.graph_panels_[row_panel_index].add (ps.graph_);
- }
-
- public Dimension getPreferredSize ()
- {
- // The preferred size is: height = the height of the number of
- // rows; width = static --- always the width of 5 graphs.
- int num_graphs = this.props_.size ();
- int num_rows = (num_graphs % MAX_HEIGHT) + 1;
-
- return new Dimension (MAX_WIDTH * (GRAPH_DIMENSION + HSPACE),
- num_rows * (GRAPH_DIMENSION + VSPACE));
- }
-
- public void run ()
- {
- // Periodically awaken and poll the dynamic properties, updating
- // the graphs with the new values.
-
- for (;;)
- {
- synchronized (this)
- {
- // An atomic operation.
- if (! this.continue_)
- break;
- }
-
- // Update each dynamic property's graph.
- Enumeration dprops = this.props_.elements ();
- while (dprops.hasMoreElements ())
- {
- Prop_Struct ps = (Prop_Struct) dprops.nextElement ();
-
- // Pull the new value of the dynamic property and insert
- // it into the corresponding strip chart.
- try
- {
- float new_point =
- Server_Discovery_Util.evaluate_performance_property (this.server_name_, ps.dp_);
- ps.graph_.update (new_point);
- }
- catch (Exception excp) {}
- }
-
- // Go to sleep for 2 seconds.
- try
- {
- Thread.sleep (2000);
- }
- catch (Exception excp) {}
- }
- }
-
- private void cease_updates ()
- {
- synchronized (this)
- {
- // An atomic operation.
- this.continue_ = false;
- }
- }
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/server_discovery/Server_Discovery_Selection.java b/TAO/orbsvcs/tests/AVStreams/server_discovery/Server_Discovery_Selection.java
deleted file mode 100644
index b6c2847064e..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/server_discovery/Server_Discovery_Selection.java
+++ /dev/null
@@ -1,199 +0,0 @@
-import java.awt.*;
-import java.awt.event.*;
-import java.util.*;
-import com.sun.java.swing.*;
-import com.sun.java.swing.event.*;
-import com.sun.java.swing.border.*;
-import com.sun.java.swing.tree.*;
-import com.sun.java.swing.table.*;
-import com.sun.java.swing.border.*;
-import Server_Discovery;
-import Server_Discovery_Util;
-
-public class Server_Discovery_Selection
- extends JInternalFrame
-{
- JTree tree_;
- Server_Discovery sd_;
- JScrollPane table_scroller_ = new JScrollPane ();
- DefaultMutableTreeNode root_ = new DefaultMutableTreeNode ("Movies");
- String selected_movie_ = null, selected_server_ = null;
- Hashtable movie_map_ = new Hashtable ();
-
- public Server_Discovery_Selection (Server_Discovery sd)
- {
- super ("Movie Selection", true, true, true, true);
- this.sd_ = sd;
-
- tree_ = new JTree (this.root_);
- JScrollPane tree_scroller = new JScrollPane (this.tree_);
- JSplitPane split_pane =
- new JSplitPane (JSplitPane.HORIZONTAL_SPLIT, false,
- tree_scroller, this.table_scroller_);
-
- TreeSelectionListener tsl = new TreeSelectionListener ()
- {
- public void valueChanged (TreeSelectionEvent e)
- {
- TreePath tree_path = e.getNewLeadSelectionPath ();
-
- if (tree_path.getPath ().length == 3)
- {
- DefaultMutableTreeNode tree_node =
- (DefaultMutableTreeNode) tree_path.getLastPathComponent ();
- String host_name = (String) tree_node.getUserObject ();
- DefaultMutableTreeNode parent_node =
- (DefaultMutableTreeNode) tree_node.getParent ();
- String movie_name = (String) parent_node.getUserObject ();
-
- String key = host_name + movie_name;
- TAO_VR.Movie movie = (TAO_VR.Movie) movie_map_.get (key);
- generate_table (host_name, movie);
- }
- }
- };
-
- this.tree_.addTreeSelectionListener (tsl);
- tree_scroller.setBackground (this.tree_.getBackground ());
-
- JPanel content_pane = new JPanel ();
- JPanel button_pane = new JPanel ();
- ImageIcon mmedia = new ImageIcon ("select", "mmedia3.gif");
- JButton select_button = new JButton ("View This Selection", mmedia);
- button_pane.setBorder (new EtchedBorder ());
- button_pane.add (select_button);
- content_pane.setLayout (new BorderLayout ());
- content_pane.add ("Center", split_pane);
- content_pane.add ("South", button_pane);
-
- ActionListener al = new ActionListener ()
- {
- public void actionPerformed (ActionEvent e)
- {
- if (selected_server_ != null && selected_movie_ != null)
- {
- Server_Discovery_Util.load_movie (selected_server_,
- selected_movie_);
- }
- }
- };
-
- select_button.addActionListener (al);
-
- this.setContentPane (content_pane);
- this.setSize (350, 400);
- this.setLocation (15, 15);
- }
-
- public void add_movie (String host_name, TAO_VR.Movie movie)
- {
- // @ TODO: Order the movies alphabetically by name.
- DefaultMutableTreeNode category =
- new DefaultMutableTreeNode (movie.category_);
- DefaultMutableTreeNode movie_name =
- new DefaultMutableTreeNode (movie.name_);
- DefaultMutableTreeNode server_name =
- new DefaultMutableTreeNode (host_name);
-
- Object[] path = { category, movie_name, server_name };
- TreePath tree_path = new TreePath (path);
-
- String key = host_name + movie.name_;
- this.movie_map_.put (key, movie);
- this.tree_.addSelectionPath (tree_path);
- }
-
- public void flush ()
- {
- }
-
- private void generate_table (String host_name, TAO_VR.Movie movie)
- {
- // The user object here is going to be a JTable instead of a
- // simply a string. The table will contain values for each of
- // the fields of the TAO_VR.Movie struct, where the description
- // URL will be hightlighted as a link. Clicking on that link in
- // the table will call up a JEditorPane with the html file in
- // it. In addition, there will be a button in one of table
- // entries for viewing performance numbers.
- DefaultTableModel table_model = new DefaultTableModel (10, 2);
-
- // Set the column values:
- table_model.setValueAt ("Name", 0, 0);
- table_model.setValueAt ("File Name", 1, 0);
- table_model.setValueAt ("Category", 2, 0);
- table_model.setValueAt ("Description", 3, 0);
- table_model.setValueAt ("Format", 4, 0);
- table_model.setValueAt ("File Size", 5, 0);
- table_model.setValueAt ("Duration", 6, 0);
- table_model.setValueAt ("Frame Rate", 7, 0);
- table_model.setValueAt ("Frame Size", 8, 0);
- table_model.setValueAt ("Server Performance", 9, 0);
-
- table_model.setValueAt (movie.name_, 0, 1);
- table_model.setValueAt (movie.filename_, 1, 1);
- table_model.setValueAt (movie.category_, 2, 1);
- table_model.setValueAt ("0", 4, 1);
- table_model.setValueAt ("MPEG", 5, 1);
- table_model.setValueAt ("0", 6, 1);
- table_model.setValueAt ("0", 7, 1);
- table_model.setValueAt ("0", 8, 1);
-
- // Special cases:
- Font label_font = new Font ("Dialog", Font.BOLD, 12);
- ImageIcon link_icon = new ImageIcon ("link", "www1.gif");
- JLabel url_label = new JLabel (movie.description_, link_icon, JLabel.RIGHT);
- url_label.setFont (label_font);
- url_label.setForeground (Color.blue);
- url_label.addMouseListener (new Clicked_URL (movie.description_));
- table_model.setValueAt (url_label, 3, 1);
-
- ImageIcon graph_icon = new ImageIcon ("graph", "graph02.gif");
- JLabel graph_label = new JLabel ("Display server performance", graph_icon, JLabel.RIGHT);
- graph_label.setFont (label_font);
- graph_label.setForeground (Color.blue);
- graph_label.addMouseListener (new Clicked_Graph (movie.name_, host_name));
- table_model.setValueAt (graph_label, 9, 1);
-
- JTable movie_table = new JTable (table_model);
- DefaultMutableTreeNode table_node = new DefaultMutableTreeNode (movie_table, false);
-
- JViewport viewport = new JViewport ();
- viewport.setView (movie_table);
- this.table_scroller_.setViewport (viewport);
- this.selected_movie_ = movie.name_;
- this.selected_server_ = host_name;
- }
-
- class Clicked_URL extends MouseAdapter
- {
- private String url_;
-
- public Clicked_URL (String url)
- {
- this.url_ = url;
- }
-
- public void mouseClicked (MouseEvent e)
- {
- sd_.load_page (this.url_);
- }
- }
-
- class Clicked_Graph extends MouseAdapter
- {
- private String movie_, host_;
-
- public Clicked_Graph (String movie, String host)
- {
- this.movie_ = movie;
- this.host_ = host;
- }
-
- public void mouseClicked (MouseEvent e)
- {
- sd_.display_performance (this.movie_, this.host_);
- }
- }
-}
-
diff --git a/TAO/orbsvcs/tests/AVStreams/server_discovery/Server_Discovery_Util.java b/TAO/orbsvcs/tests/AVStreams/server_discovery/Server_Discovery_Util.java
deleted file mode 100644
index 3ee396a17f1..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/server_discovery/Server_Discovery_Util.java
+++ /dev/null
@@ -1,29 +0,0 @@
-// ========================================================================
-// $Id$
-//
-// = FILENAME
-// Server_Discovery_Util.java
-//
-// = AUTHOR
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// ========================================================================
-
-import java.io.*;
-
-public class Server_Discovery_Util
-{
- // public static native int init (String[] args);
-
- public static native void query_trader ();
-
- public static native String[] get_servers ();
-
- public static native TAO_VR.Movie[] get_movie_info (String host_name);
-
- public static native
- void load_movie (String server_name, String movie_name);
-
- public static native
- float evaluate_performance_property (String server_name, String prop_name);
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/server_discovery/Strip_Chart.java b/TAO/orbsvcs/tests/AVStreams/server_discovery/Strip_Chart.java
deleted file mode 100644
index 687c16a8077..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/server_discovery/Strip_Chart.java
+++ /dev/null
@@ -1,188 +0,0 @@
-// $Id$
-//
-// = FILENAME
-// DoubleVisComp.java
-//
-// = AUTHOR
-// Seth Widoff (core graph functionality)
-// Michael Kircher (mk1@cs.wustl.edu)
-//
-// = DESCRIPTION
-// This is a Visualization Component for displaying doubles.
-//
-// ============================================================================
-
-import java.awt.*;
-import java.util.*;
-
-public class Strip_Chart extends Canvas
-{
- private static final int MIN_SPACING = 2;
- private static final int POINT_HISTORY = 200;
- private static final Font FONT = new Font ("Dialog", Font.PLAIN, 10);
-
- private Queue plot_;
- private String title_;
- private Graphics offgraphics_;
- private Image offscreen_;
- private Dimension offscreensize_;
- private int max_value_;
- private int old_max_value_;
- private int spacing_;
- private float local_max_ = 0;
- private boolean max_increased_ = false;
-
- public Strip_Chart (String title)
- {
- super();
-
- plot_ = new Queue ();
- spacing_ = MIN_SPACING;
- title_ = title;
- max_value_ = 1;
- // max_value_ = max_value;
- old_max_value_ = max_value_;
-
- java.util.Random rand = new java.util.Random (System.currentTimeMillis());
- float hue_ = rand.nextFloat();
- float brightness = rand.nextFloat();
-
- hue_ += .075;
-
- if (hue_ > 1.0)
- hue_ -= 1.0;
-
- if (brightness > 0.75)
- brightness -= 0.25;
-
- Color new_color = Color.getHSBColor(hue_, 1, brightness);
-
- this.setBackground(new_color);
- this.setForeground(Color.white);
- }
-
-
- public void setName (String title) {
- title_ = title;
- }
-
- public Dimension getMinimumSize () {
- return new Dimension (75, 75);
- }
-
- public Dimension getPreferredSize () {
- return new Dimension (175, 175);
- }
-
- public String getName() {
- return title_;
- }
-
- public int getMax() {
- return old_max_value_;
- }
-
- public void update (float new_point)
- {
- Float temp = (Float) plot_.dequeue_tail();
- plot_.enqueue_head (new Float (new_point));
-
- if (new_point > local_max_)
- local_max_ = new_point;
-
- while (local_max_ > max_value_)
- max_value_ *= 2;
-
- while ((local_max_ < max_value_/2) && (max_value_ > old_max_value_))
- max_value_ /= 2;
-
- repaint();
- }
-
- public void update(Graphics g)
- {
- Dimension d = getSize ();
- float tmp, value_1, value_2;
- FontMetrics fm = g.getFontMetrics ();
- Enumeration queue_iter = plot_.forward_iterator();
- int x1 = d.width - 8, y1, x2, y2, fheight = fm.getHeight (), i;
- String value = "Value (of " + max_value_ + "): " + String.valueOf(plot_.head());
-
- if ((offscreen_ == null) ||
- (offscreensize_.width != d.width - 8) ||
- (offscreensize_.height != d.height - 8))
- {
- offscreen_ = createImage(d.width - 8, d.height - 8);
- offscreensize_ = new Dimension(d.width - 8, d.height - 8);
- offgraphics_ = offscreen_.getGraphics();
- offgraphics_.setFont(FONT);
- }
-
- g.setColor (Color.lightGray);
- g.draw3DRect (0, 0, d.width - 1, d.height - 1, true);
- g.draw3DRect (1, 1, d.width - 3, d.height - 3, true);
- g.draw3DRect (2, 2, d.width - 5, d.height - 5, true);
-
- local_max_ = 0;
- offgraphics_.setColor (getBackground());
- offgraphics_.fillRect (0, 0, offscreensize_.width, offscreensize_.height);
- offgraphics_.setColor (getForeground());
- offgraphics_.drawString(title_, 5, fheight);
- offgraphics_.drawString(value, 5, offscreensize_.height - 5);
-
- value_1 = ((Float)queue_iter.nextElement()).floatValue();
- while (queue_iter.hasMoreElements())
- {
- value_2 = ((Float)queue_iter.nextElement()).floatValue();
-
- if (value_1 > local_max_)
- local_max_ = value_1;
-
- y1 = normalize(offscreensize_.height - fheight, value_1);
- y2 = normalize(offscreensize_.height - fheight, value_2);
-
- tmp = value_2;
- value_2 = value_1;
- value_1 = tmp;
-
- x2 = x1 - spacing_;
- offgraphics_.drawLine(x1, y1, x2, y2);
- x1 = x2;
- if (x1 <= 5)
- break;
- }
-
- g.drawImage(offscreen_, 3, 3, null);
- }
-
- public void paint(Graphics g)
- {
- Dimension d = getSize ();
- int plot_length = plot_.length();
- int num_points = d.width / spacing_;
-
- if (plot_.length() < num_points)
- {
- for (int i = 0; i < num_points - plot_length; i++)
- plot_.enqueue_tail(new Float(0));
- }
- else if (plot_.length() > num_points)
- {
- for (int i = 0; i < plot_length - num_points; i++)
- plot_.dequeue_tail();
- }
-
- update(g);
- }
-
-
- private int normalize(int height, float coord)
- {
- float ratio = (float)coord/max_value_;
- float pixels = (float)height*ratio;
- float location = (float)height - pixels;
-
- return Math.round(location);
- }
-}
-
diff --git a/TAO/orbsvcs/tests/AVStreams/server_discovery/Trader_Client.cpp b/TAO/orbsvcs/tests/AVStreams/server_discovery/Trader_Client.cpp
deleted file mode 100644
index 1e0fa2f8ae8..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/server_discovery/Trader_Client.cpp
+++ /dev/null
@@ -1,311 +0,0 @@
-// ========================================================================
-// $Id$
-//
-// = FILENAME
-// Trader_Client.cpp
-//
-// = AUTHOR
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// ========================================================================
-
-#include "Trader_Client.h"
-
-ACE_RCSID(server_discovery, Trader_Client, "$Id$")
-
-Trader_Client* Trader_Client::instance_ = 0;
-
-Trader_Client*
-Trader_Client::instance (void)
-{
- if (Trader_Client::instance_ == 0)
- Trader_Client::instance_ = new Trader_Client;
-
- return Trader_Client::instance_;
-}
-
-Trader_Client::Trader_Client (void)
-{
-}
-
-Trader_Client::~Trader_Client (void)
-{
- // Iterate and destroy all dynamically allocated second-tier maps.
- for (Server_Map::ITERATOR map_iter (this->map_);
- ! map_iter.done ();
- map_iter.advance ())
- {
- Server_Map::ENTRY* map_entry = 0;
- map_iter.next (map_entry);
- delete map_entry->int_id_;
- }
-}
-
-void
-Trader_Client::init (int argc, char** argv)
-{
- TAO_TRY
- {
- // Initialize the orb.
- this->orb_manager_.init (argc, argv, TAO_TRY_ENV);
-
- // Bootstrap to the Trading Service.
- ACE_DEBUG ((LM_DEBUG, "Bootstrapping to the trading service"));
- CORBA::ORB_var orb = this->orb_manager_.orb ();
- CORBA::Object_var obj =
- orb->resolve_initial_references ("TradingService");
-
- // Narrow the lookup interface.
- ACE_DEBUG ((LM_DEBUG, "Narrowing the lookup interface.\n"));
- this->lookup_ = CosTrading::Lookup::_narrow (obj.in (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
- }
- TAO_CATCHANY
- {
- ACE_ERROR ((LM_ERROR, "Failed to initialize the ORB and bootstrap to"
- " the Trading Service. Wah!\n"));
- }
- TAO_ENDTRY;
-}
-
-void
-Trader_Client::query_trader (void)
-{
- // This code is copied nearly verbatim from
- // orbsvcs/tests/Trading/Offer_Importer.cpp, where its not well
- // documented either.
- TAO_TRY
- {
- CosTrading::OfferSeq_ptr offer_seq_ptr = 0;
- CosTrading::OfferIterator_ptr offer_iterator_ptr = 0;
- CosTrading::PolicyNameSeq_ptr limits_applied_ptr = 0;
- CosTrading::Lookup::SpecifiedProps desired_props;
-
- // Set the query-specific policies.
- TAO_Policy_Manager policies;
- policies.exact_type_match (0);
- policies.search_card (16);
- policies.match_card (16);
- policies.return_card (16);
- policies.link_follow_rule (CosTrading::always);
- desired_props.all_ (1);
-
- CosTrading::OfferSeq_out offer_seq_out (offer_seq_ptr);
- CosTrading::OfferIterator_out offer_iterator_out (offer_iterator_ptr);
- CosTrading::PolicyNameSeq_out limits_applied_out (limits_applied_ptr);
-
- ACE_DEBUG ((LM_DEBUG, "Querying trader...\n"));
- this->lookup_->query ("MMDevice",
- "Number_Of_Connections < Max_Connections",
- "min Number_Of_Connections",
- policies.policy_seq (),
- desired_props,
- 8,
- offer_seq_out,
- offer_iterator_out,
- limits_applied_out,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- CosTrading::OfferSeq_var offer_seq (offer_seq_ptr);
- CosTrading::OfferIterator_var offer_iterator (offer_iterator_ptr);
- CosTrading::PolicyNameSeq_var limits_applied (limits_applied_ptr);
-
- if (offer_seq_ptr != 0)
- {
- ACE_DEBUG ((LM_DEBUG, "Hashing the returned offers.\n"));
- CORBA::ULong length = 0, i = 0;
- for (length = offer_seq->length (), i = 0; i < length; i++)
- this->create_hash_table_entry (offer_seq[i]);
- }
-
- if (! CORBA::is_nil (offer_iterator_ptr))
- {
- // Hash those offers obtained from the Offer_Iterator.
- CORBA::Boolean any_left = 0;
-
- do
- {
- CosTrading::OfferSeq_ptr iter_offers_ptr;
- CosTrading::OfferSeq_out iter_offers_out (iter_offers_ptr);
-
- any_left = offer_iterator->next_n (8,
- iter_offers_out,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- CosTrading::OfferSeq_var iter_offers (iter_offers_ptr);
- for (CORBA::ULong length = iter_offers->length (), i = 0; i < length; i++)
- this->create_hash_table_entry (iter_offers[i]);
- }
- while (any_left);
-
- offer_iterator->destroy (TAO_TRY_ENV);
- TAO_CHECK_ENV;
- }
- }
- TAO_CATCHANY {}
- TAO_ENDTRY;
-}
-
-void
-Trader_Client::load_movie (const char* server_name, const char* movie_name)
-{
- // Open a unix socket to the controller process of the AV client,
- // and pass in the IOR of the selected server and the movie_name.
-
- // Of course, we aren't actually saving the object reference
- // portion of the offer at this point. But genius that you are,
- // you'll figure out some way to retrofit this code with the
- // required elements. I believe in you.
-}
-
-void
-Trader_Client::get_servers (int& length, char**& server_names)
-{
- ACE_DEBUG ((LM_DEBUG, "Trader_Client::get_servers.\n"));
-
- length = this->map_.current_size ();
- server_names = new char* [length];
-
- if (server_names != 0)
- {
- CORBA::ULong i = 0;
- for (Server_Map::ITERATOR server_iter (this->map_);
- ! server_iter.done ();
- server_iter.advance (), i++)
- {
- ACE_DEBUG ((LM_DEBUG, " adding server: %s\n", (*server_iter).ext_id_.in ()));
- server_names[i] =
- ACE_const_cast (char*, (*server_iter).ext_id_.in ());
- }
- }
-}
-
-Movie_Iterator*
-Trader_Client::get_movie_info (const char* server_name)
-{
- ACE_DEBUG ((LM_DEBUG, "Trader_Client: Get Movie Info\n"));
- Movie_Iterator* movie_iter = 0;
- TAO_String_Hash_Key server_name_key (server_name);
-
- // Find the entry for the designated server.
- Server_Map::ENTRY* server_entry = 0;
- if (this->map_.find (server_name_key, server_entry) == 0)
- {
- // Locate the movie_info property.
- Property_Map::ENTRY* prop_entry = 0;
- Property_Map* prop_map = server_entry->int_id_;
- if (prop_map->find ("Movie_Info", prop_entry) == 0)
- {
- // Make a fake sequence out of the property for use in the
- // TAO_Property_Evaluator utility class.
- CosTrading::Property& property = prop_entry->int_id_;
- CosTrading::PropertySeq property_seq (1, 1, &property, 0);
- TAO_Property_Evaluator prop_eval (property_seq);
-
- TAO_TRY
- {
- // Extact the Movie_Info sequence.
- TAO_VR::Movie_Info* movie_info = 0;
- CORBA::Any* movie_prop = prop_eval.property_value (0, TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- // Create the movie iterator.
- if (((*movie_prop) >>= movie_info) == 1)
- movie_iter = new Movie_Iterator (*movie_info);
- }
- TAO_CATCHANY {}
- TAO_ENDTRY;
- }
- }
-
- return movie_iter;
-}
-
-float
-Trader_Client::evaluate_performance_property (const char* server_name,
- const char* property_name)
-{
- float return_value = 0.0;
- Server_Map::ENTRY* server_entry = 0;
- TAO_String_Hash_Key server_name_key (server_name);
-
- // Locate the property and evaluate it. <--- vivid description, eh?
- if (this->map_.find (server_name_key, server_entry) == 0)
- {
- Property_Map* prop_map = server_entry->int_id_;
- TAO_String_Hash_Key prop_name_key (property_name);
- Property_Map::ENTRY* prop_entry = 0;
-
- if (prop_map->find (prop_name_key, prop_entry) == 0)
- {
- CosTrading::Property& property = prop_entry->int_id_;
- CosTrading::PropertySeq property_seq (1, 1, &property, 0);
- TAO_Property_Evaluator prop_eval (property_seq);
-
- TAO_TRY
- {
- CORBA::Any* value = prop_eval.property_value (0, TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- CORBA::Float prop_value = 0.0;
- (*value) >>= prop_value;
- }
- TAO_CATCHANY {}
- TAO_ENDTRY;
- }
- }
-
- return return_value;
-}
-
-void
-Trader_Client::create_hash_table_entry (CosTrading::Offer& offer)
-{
- Property_Map* prop_map = 0;
- ACE_NEW (prop_map, Property_Map);
-
- ACE_DEBUG ((LM_DEBUG, "Hashing an offer.\n"));
- for (CORBA::ULong length = offer.properties.length (), i = 0;
- i < length; i++)
- {
- TAO_String_Hash_Key prop_name (offer.properties[i].name);
- ACE_DEBUG ((LM_DEBUG, "Hashing property %s.\n", prop_name.in ()));
- prop_map->bind (prop_name, offer.properties[i]);
- }
-
- Property_Map::ENTRY* entry = 0;
- TAO_String_Hash_Key server_name ("Server_Name");
- if (prop_map->find (server_name, entry) == 0)
- {
- char* server_name_string = 0;
- entry->int_id_.value >>= server_name_string;
- this->map_.bind (server_name_string, prop_map);
-
- ACE_DEBUG ((LM_DEBUG, "Bound hash map entry for %s\n",
- server_name_string));
- }
- else
- delete prop_map;
-}
-
-TAO_VR::Movie_Info*
-Trader_Client::fetch_movie_array (const char* server_name)
-{
- TAO_VR::Movie_Info* movie_info = 0;
- Server_Map::ENTRY* server_entry = 0;
- TAO_String_Hash_Key server_name_str (server_name);
- if (this->map_.find (server_name, server_entry) == 0)
- {
- Property_Map::ENTRY* prop_entry = 0;
- Property_Map* prop_map = server_entry->int_id_;
- if (prop_map->find ("Movie_Info", prop_entry) == 0)
- {
- TAO_VR::Movie_Info* movie_info = 0;
- prop_entry->int_id_.value >>= movie_info;
- }
- }
-
- return movie_info;
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/server_discovery/Trader_Client.h b/TAO/orbsvcs/tests/AVStreams/server_discovery/Trader_Client.h
deleted file mode 100644
index 6bc3449b640..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/server_discovery/Trader_Client.h
+++ /dev/null
@@ -1,126 +0,0 @@
-// ========================================================================
-// $Id$
-//
-// = FILENAME
-// Trader_Client.h
-//
-// = AUTHOR
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// ========================================================================
-
-#ifndef TRADER_CLIENT_H
-#define TRADER_CLIENT_H
-
-#include "tao/TAO.h"
-#include "Video_RepositoryC.h"
-#include "orbsvcs/Trader/Trader.h"
-#include "orbsvcs/Trader/Trader_Utils.h"
-
-class Movie_Iterator
-{
-public:
-
- Movie_Iterator (const TAO_VR::Movie_Info& movie_info)
- : movie_info_ (movie_info), index_ (0) {}
-
- int has_more_elements (void) const
- { return this->index_ < this->movie_info_.length (); }
-
- void advance (void)
- { this->index_++; }
-
- int num_movies (void) const
- { return this->movie_info_.length (); }
-
- const char* name (void) const
- { return this->movie_info_[this->index_].name_.in (); }
-
- const char* description (void) const
- { return this->movie_info_[this->index_].description_.in (); }
-
- const char* filename (void) const
- { return this->movie_info_[this->index_].filename_.in (); }
-
- const char* category (void) const
- { return this->movie_info_[this->index_].category_.in (); }
-
-private:
-
- int index_;
-
- TAO_VR::Movie_Info movie_info_;
-};
-
-class Trader_Client
-// = TITLE
-// Performs all the interaction with the Trading Service on behalf
-// of the Java server selection GUI.
-{
-public:
-
- ~Trader_Client (void);
- // Destory all that was dynamically allocated.
-
- void init (int argc, char** argv);
- // Call once, prior to query_trader.
-
- void query_trader (void);
- // Call n times, after init has been called.
-
- void load_movie (const char* server_name, const char* movie_name);
- // Instruct the A/V client to begin an A/V stream with the
- // designated host.
-
- void get_servers (int& length, char**& server_names);
- // Return the list of server names whose offers were obtained from
- // the Trader.
-
- Movie_Iterator* get_movie_info (const char* server_name);
- // Fill in the sequence with movie information for all movies
- // offered by the specified server.
-
- float evaluate_performance_property (const char* server_name,
- const char* property_name);
- // Evaluate the specified property with respect to the offer from
- // the specified server.
-
- static Trader_Client* instance (void);
-
-protected:
-
- Trader_Client (void);
- // No-arg, no-op constructor. Necessary since this class is
- // instantiated in a no-arg factory method.
-
-private:
-
- static Trader_Client* instance_;
-
- void create_hash_table_entry (CosTrading::Offer& offer);
-
- TAO_VR::Movie_Info* fetch_movie_array (const char* server_name);
-
- typedef
- ACE_Hash_Map_Manager <TAO_String_Hash_Key, CosTrading::Property, ACE_Null_Mutex>
- Property_Map;
- // Second-tier map --- maps property names to their values.
-
- typedef
- ACE_Hash_Map_Manager <TAO_String_Hash_Key, Property_Map*, ACE_Null_Mutex>
- Server_Map;
- // First tier map --- maps server names to their second-tier maps.
-
- TAO_ORB_Manager orb_manager_;
- // Standard orb stuff.
-
- CosTrading::Lookup_var lookup_;
- // A reference to the trader, what else?
-
- Server_Map map_;
- // The two-tiered map of server names to a map of property names to
- // values.
-};
-
-#endif /* TRADER_CLIENT_H */
-
diff --git a/TAO/orbsvcs/tests/AVStreams/server_discovery/graph02.gif b/TAO/orbsvcs/tests/AVStreams/server_discovery/graph02.gif
deleted file mode 100644
index aaa6262c03e..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/server_discovery/graph02.gif
+++ /dev/null
Binary files differ
diff --git a/TAO/orbsvcs/tests/AVStreams/server_discovery/graph09.gif b/TAO/orbsvcs/tests/AVStreams/server_discovery/graph09.gif
deleted file mode 100644
index a090e98b277..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/server_discovery/graph09.gif
+++ /dev/null
Binary files differ
diff --git a/TAO/orbsvcs/tests/AVStreams/server_discovery/main.cpp b/TAO/orbsvcs/tests/AVStreams/server_discovery/main.cpp
deleted file mode 100644
index e26251fb0ab..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/server_discovery/main.cpp
+++ /dev/null
@@ -1,74 +0,0 @@
-// ========================================================================
-// $Id$
-//
-// = FILENAME
-// main.cpp
-//
-// = AUTHOR
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// ========================================================================
-#include <jni.h>
-
-ACE_RCSID(server_discovery, main, "$Id$")
-
-#define PATH_SEPARATOR ':'
-#define USER_CLASSPATH "." /* where Prog.class is */
-
-#include "Trader_Client.h"
-
-int
-main (int argc, char** argv)
-{
- JNIEnv *env;
- JavaVM *jvm;
- JDK1_1InitArgs vm_args;
- jint res;
- jclass cls;
- jmethodID mid;
- jstring jstr;
- jobjectArray args;
- char classpath[1024];
-
- /* IMPORTANT: specify vm_args version # if you use JDK1.1.2 and beyond */
- vm_args.version = 0x00010001;
-
- JNI_GetDefaultJavaVMInitArgs (&vm_args);
-
- /* Append USER_CLASSPATH to the end of default system class path */
- sprintf(classpath, "%s%c%s",
- vm_args.classpath, PATH_SEPARATOR, USER_CLASSPATH);
- vm_args.classpath = classpath;
-
- ACE_DEBUG ((LM_DEBUG, "Classpath: %s\n", classpath));
-
- /* Create the Java VM */
- res = JNI_CreateJavaVM (&jvm, (void**) &env, (void*) &vm_args);
- if (res < 0)
- ACE_ERROR_RETURN ((LM_ERROR, "Can't create Java VM\n"), -1);
-
- cls = env->FindClass ("Server_Discovery");
- if (cls == 0)
- ACE_ERROR_RETURN ((LM_ERROR, "Can't find Server Discovery class\n"), -1);
-
- mid = env->GetStaticMethodID(cls, "main", "([Ljava/lang/String;)V");
- if (mid == 0)
- ACE_ERROR_RETURN ((LM_ERROR, "Can't find Server_Discovery.main\n"), -1);
-
- jstr = env->NewStringUTF (" from C!");
- if (jstr == 0)
- ACE_ERROR_RETURN ((LM_ERROR, "Out of memory\n"), -1);
-
- args = env->NewObjectArray(1, env->FindClass ("java/lang/String"), jstr);
- if (args == 0)
- ACE_ERROR_RETURN ((LM_ERROR, "Out of memory\n"), -1);
-
- Trader_Client* trader_client = Trader_Client::instance ();
- trader_client->init (argc, argv);
- trader_client->query_trader ();
-
- ACE_DEBUG ((LM_DEBUG, "Launching the java GUI stuff.\n"));
- env->CallStaticVoidMethod (cls, mid, args);
-
- jvm->DestroyJavaVM ();
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/server_discovery/mmedia3.gif b/TAO/orbsvcs/tests/AVStreams/server_discovery/mmedia3.gif
deleted file mode 100644
index d92c29b370a..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/server_discovery/mmedia3.gif
+++ /dev/null
Binary files differ
diff --git a/TAO/orbsvcs/tests/AVStreams/server_discovery/server01.gif b/TAO/orbsvcs/tests/AVStreams/server_discovery/server01.gif
deleted file mode 100644
index b4e877d3170..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/server_discovery/server01.gif
+++ /dev/null
Binary files differ
diff --git a/TAO/orbsvcs/tests/AVStreams/server_discovery/server02.gif b/TAO/orbsvcs/tests/AVStreams/server_discovery/server02.gif
deleted file mode 100644
index e46bcb8deb7..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/server_discovery/server02.gif
+++ /dev/null
Binary files differ
diff --git a/TAO/orbsvcs/tests/AVStreams/server_discovery/www1.gif b/TAO/orbsvcs/tests/AVStreams/server_discovery/www1.gif
deleted file mode 100644
index bc4b2e434cc..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/server_discovery/www1.gif
+++ /dev/null
Binary files differ