Platform SDK Java 9.0 API Reference

Package com.genesyslab.platform.apptemplate.application

This package provides helper components for connectivity with Genesys Configuration Framework.

CME application configuration monitoring may be done with GFApplicationConfigurationManager.
It manages Configuration Server connection, the application configuration reading, and its update notifications.
It also checks availability of Log4j2 logging framework, and automatically enables its configuration by the Genesys CME application logging options.

The shortest way to get an application configured for logging in accordance to the application "log" section may look like:

 GFApplicationConfigurationManager appManager =
         GFApplicationConfigurationManager.newBuilder()
         .withCSEndpoint(new Endpoint("CS-primary", csHost1, csPort1))
         .withCSEndpoint(new Endpoint("CS-backup", csHost2, csPort2))
         .withClientId(clientType, clientName)
         .withUserId(csUsername, csPassword)
         .build();

 // If the application uses options other than the logging related, it may
 // register own handler for appliance of the configuration:
 appManager.register(new GFAppCfgOptionsEventListener() {
     public void handle(final GFAppCfgEvent event) {
         Log.getLogger(getClass()).info(
                 "The application configuration options received: " + event);
         // Initialize or update own application options from 'event.getAppConfig()'
     }});

 appManager.init();

 // Do the application work...

 // On the application exit:
 appManager.done();
 
See Also:
GFApplicationConfigurationManager
Skip navigation links
Platform SDK Java 9.0 API Reference

Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 9.0.006.00
Copyright © 2006–2019 Genesys Telecommunications Laboratories, Inc. All rights reserved.