This directory contains the PreEmptive Analytics Java API, its documentation, and some samples. We especially appreciate your suggestions to how we can improve the API to meet your needs. Please send your comments or suggestions to

Important Links

PreEmptive Analytics

The APIs in this directory support PreEmptive Analytics which can be used to give application authors and users insight into how their applications are being used.

The PreEmptive Analytics API is just like any other Java library. Choose the JAR for your application and add it to your project:

The Javadoc for these APIs are included in this directory.

To use the API you will need two GUIDs:

You want to use the same Application ID for the entire application's lifetime, even when you release new versions: PreEmptive Analytics tracks your application's version via RuntimeIntelligence.setApplicationVersion().

API Usage Pattern

The general usage pattern of the API is:

Observing Generated Data

To aid in the quick testing of your use of the APIs this directory includes a WAR file that you can deploy locally for testing purposes. The sink.war contains a simple servlet that prints out the headers and the body of HTTP requests. To use this for testing you need to perform the following steps:

  1. Deploy the WAR file to a servlet container such as Apache Tomcat on your local machine
  2. Use HTTP rather that HTTPS by calling setUseSsl(false)
  3. Set the endpoint to point to the machine and port where the WAR file is deployed by calling setServiceEndpoint("host:port/sink/Sink")

Messages that your application generates will be echoed by the servlet rather than being sent to the PA Server. If using Tomcat, you can see them in the localhost log.

Remember to comment out or remove the calls to setUseSsl() and setServiceEndpoint() before releasing your application!


Provided are some samples which use the PreEmptive Analytics APIs.