Skip Headers
Oracle® Enterprise Data Quality for Product Data Java API Interface Guide
Release 11g R1 (11.1.1.6)

Part Number E29133-03
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
PDF · Mobi · ePub

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 oracle.pdq.api1.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, except that you cycle 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;
            }
        }