6.1 Using the Java SDK

Working with server side events and the Host Access for the Cloud SDK you can supply procedural Java code that can extend and improve the presentation of host data. To help you create server side events, Host Access for the Cloud has an SDK and samples that can provide you with a starting point.

The Javadocs are available in your installation directory (<install dir>\sessionserver\sdk\java\javadocs\index.html) as well as online.

  1. Make the Host Access for the Cloud SDK available to your development environment. The SDK is available at install-dir\sessionserver\sdk.

  2. Write the Java code necessary to accomplish the task and compile the code into a Java class within a JAR (Java Archive) file.

  3. Copy the JAR file to <install-dir>\sessionserver\microservices\extensions\server and restart the session server.

    If you have more than one session server on which you want the event to run, you must copy the JAR file to this location on each server.

  4. Add the session you want to associate with the event in the Administrative Console.

  5. As you configure the session in the web client, open the Customization panel and type the fully qualified class name to the event.

  6. Launch the session and test the event.

6.1.1 Examples and documentation

To access the SDK for direct viewing and to import to your IDE:

  1. Navigate to <install-dir>\sessionserver\sdk\java.

  2. In the SDK directory, access:

    • \javadoc. This directory contains javadoc files for direct viewing.

    • \samples - This directory contains Java sources for direct viewing.

    • \zfe-sdk.jar - The JAR file contains the Java classes to import into your IDE.

    • \zfe-sdk-javadoc.jar - The JAR file contains JavaDoc files to import into your IDE.