Statistics Platform SDK 7.6 Java

Voice Platform SDK Code Example for Java

v1.0 02-2008


Table of Contents


Introduction

The Platform SDK code examples show you how to carry out common functions of the Platform SDKs. The code examples focus on basic tasks, such as connecting to and communicating with Genesys servers, and often use the Protocol Manager and and Event Broker application blocks where possible. For more information about using the Genesys Platform SDK, consult your Platform SDK 7.6 Developer's Guide.

The Voice Platform SDK Code Example for Java shows how to create an application that subscribes to a statistic and delivers the resulting information (and updates) to the desktop.

Note: Although you can use the sample code provided with the Platform SDKs in any way that you like, it is neither tested nor supported by Genesys in any way.

Before running the Platform SDK code examples, be sure that you have all required tools, environment-variables, and configuration data available. Your Platform SDK 7.6 Deployment Guide provides details about setting your Java environment. For additional information about this and other Platform SDK code samples, see your Platform SDK 7.6 Developer's Guide.

Setup

Prerequisites

You must install the following components and media:

Configuration

  1. Set the JAVA_HOME environment variable to the location of your JDK.
  2. Expand the sdk_code_platform_stat-java.zip archive file containing the code example.
  3. Use values from your Genesys servers to set the StatisticsPlatformSDKExample.java details shown below:
    // Enter configuration information here:
    private String protocolName = "<server name>";
    private String statServerHost = "<host>";
    private int statServerPort = <port>;
    // End of Statistics Server information.
    
    // Beginning of Statistic information:
    private int statKey = 1234; // unique key for this Statistic request
    private int refreshTime = 10; // notification refresh time (in seconds)
    private String statObjTenantId = "<tenant ID>";
    private String statObjId = "<object ID>";
    private String statMetricName = "<metric name>";
    private String statMetricTimeProfile = "<metric time profile>";
    private String statMetricTimeRange = "<metric time range>";
    private String statMetricFilter = "<metric filter>";
    // End of configuration information.
  4. Ensure that your classpath includes all of the required resources (including .jar files for the Platform SDK, the application blocks, and required third party components).
  5. Compile StatisticsPlatformSDKExample.java.

Running the Examples

Run the StatisticsPlatformSDKExample.class file, using the same classpath as you used when compiling the .java file.


Any authorized distribution of any copy of this code (including any related documentation) must reproduce the following restrictions, disclaimer and copyright notice:

The Genesys name, the trademarks and/or logo(s) of Genesys shall not be used to name (even as a part of another name), endorse and/or promote products derived from this code without prior written permission from Genesys Telecommunications Laboratories, Inc.

The use, copy, and/or distribution of this code is subject to the terms of the Genesys Developer License Agreement. This code shall not be used, copied, and/or distributed under any other license agreement.

THIS CODE IS PROVIDED BY GENESYS TELECOMMUNICATIONS LABORATORIES, INC. ("GENESYS") "AS IS" WITHOUT ANY WARRANTY OF ANY KIND. GENESYS HEREBY DISCLAIMS ALL EXPRESS, IMPLIED, OR STATUTORY CONDITIONS, REPRESENTATIONS AND WARRANTIES WITH RESPECT TO THIS CODE (OR ANY PART THEREOF), INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. GENESYS AND ITS SUPPLIERS SHALL NOT BE LIABLE FOR ANY DAMAGE SUFFERED AS A RESULT OF USING THIS CODE. IN NO EVENT SHALL GENESYS AND ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, ECONOMIC, INCIDENTAL, OR SPECIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ANY LOST REVENUES OR PROFITS).

Copyright © 2008 Genesys Telecommunications Laboratories, Inc. All rights reserved.