Skip Headers
Oracle® Enterprise Data Quality for Product Data Java API Interface Guide
Release 5.6.2

Part Number E23725-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

4 Server Availability API to the Oracle DataLens Server

PingClient

This interface is the provided to access the availability of the Oracle DataLens Servers.

The PingClient class is used as an interface to the Oracle DataLens Server. This class provides a simple method that returns true if an Oracle DataLens Server is available for processing data and false if it is not.

Import

Import the PingClient with the following line:

import com.onerealm.solx.api.client.PingClient;

Simple Server Check

This is a simple test to check the server availability. This can be used prior to sending data to the server for processing.

// Create the Server Api object and point to the server
PingClient pingApi = new PingClient(serverName, serverPort);
boolean available = pingApi.pingServer("JavaAPI");

Round-Robin Server Check

This is essentially the same code as in the previous section, just that we are going through a list of Oracle DataLens Servers in a Production Oracle DataLens Server Group and returning the first server that responds.

Iterator iter = serverList.iterator();
while (iter.hasNext()) {
            String serverNameStr = (String)iter.next();
            if (new PingClient(serverName, serverPort).pingServer(userName)) {
                return serverNameStr;
            }
        }