Managing Data

What is a JWAVE Data Proxy

Figure 6-1 A Proxy object refers to data stored in a PV-WAVE session. The proxy knows where to find the server (JWaveConnection), the name of the data domain name for the data (ServerDataID).

Instantiating a JWaveDataProxy Object

Other Ways to Instantiate a JWaveDataProxy Object


TIP: For detailed information on all of the constructors, variables, and methods of the JWaveDataProxy class, refer to the Javadoc reference. For information on Javadoc, see
Using the JWAVE Javadoc Reference.

The Efficiency of Using Data Proxies

Inefficient System: The Data Makes Two Round Trips

Figure 6-2 Inefficient use of JWAVE, as data is physically passed between server and client

Efficient System: No Round Trips

Figure 6-3 Efficient use of JWAVE, as data is not physically passed between server and client

Setting the Return Parameter Mode

Example: Using Data Proxies

Figure 6-4 JWAVE scenario using data proxies

NOTE: This client application calls two different JWAVE wrapper functions on the server. From the first wrapper, the client asks for a proxy to be returned. From the second wrapper, the client asks for the actual data values, which it then prints.

The Java Client Program

Example 6-1 proxyarry.java: Sends data to the server; retrieves a data proxy; uses the proxy in a subsequent JWaveExecute object

The First JWAVE Wrapper

Example 6-2 prox1.pro: Receives an array from the client and multiplies the elements by 1.5. The client asks the server to return a data proxy rather than the actual data.

The Second JWAVE Wrapper

Example 6-3 prox2.pro: The client asks this server program to process the array it stored previously. The client refers to the data on the server with a proxy. Finally, the client asks the server to send back the actual data so that it can be printed. (This wrapper multiplies the previously stored array by 100.5.)

Java Client Output

Data Proxies Are Controlled by the Client

How Long is Proxy Data Stored on the Server


TIP: You can use the Data
Manager routines DMSave and DMRestore to store data between sessions. These JWAVE wrapper procedures are described in Appendix A, JWAVE Wrapper API.

Summary





Copyright © 1999, Visual Numerics, Inc. All rights reserved.