Platform SDK Java 8.5 API Reference

com.genesyslab.platform.apptemplate.application
Class GFApplicationConfigurationManager

java.lang.Object
  extended by com.genesyslab.platform.apptemplate.application.GFApplicationConfigurationManager
All Implemented Interfaces:
SubscriptionService<GFAppCfgEvent>

public class GFApplicationConfigurationManager
extends java.lang.Object
implements SubscriptionService<GFAppCfgEvent>

The Application Configuration Management component facade class.

It monitors given application configuration and configuration of its connected applications (servers), and notifies the application about changes of their properties in the Configuration Server.

The application configuration manager instance may be created by using the builder - newBuilder().

See Also:
ConfServiceFactory

Nested Class Summary
protected  class GFApplicationConfigurationManager.GFAppCfgEventImpl
          Internal implementation of Genesys CME application configuration manager event.
protected  class GFApplicationConfigurationManager.GFApplicationContextImpl
           
static class GFApplicationConfigurationManager.ManagerBuilder
          Dedicated builder for basic implementation of application configuration manager.
 
Field Summary
protected  GCOMApplicationConfiguration appConfig
           
protected  GFApplicationConfigurationManager.GFApplicationContextImpl appContext
           
protected  LmsEventLogger lmsLogger
           
protected  LmsLoggerFactory lmsLoggerFactory
           
protected  LmsMessageConveyor lmsMessageConveyor
           
protected  java.util.concurrent.locks.Lock stateLock
           
protected  WarmStandby theWarmStandby
           
 
Constructor Summary
protected GFApplicationConfigurationManager(java.lang.String appName, IConfService confService, WarmStandby warmStandby, boolean doCSSubscribe, boolean doCSDispose)
          Protected constructor to share some logic for the private constructor and constructor of eventual child classes.
 
Method Summary
 void done()
           
protected  void doSubscription()
           
 GFApplicationContext getAppContext()
           
 java.lang.String getAppName()
           
protected  AsyncInvoker getInvoker()
           
protected  GCOMApplicationConfiguration getNewConfig()
           
protected  void handleEvent(GFAppCfgEvent appEvent)
           
protected  void handleEvent(GFAppCfgEvent appEvent, java.lang.Runnable task)
           
protected  void handleTask(java.lang.Runnable task)
           
 void init()
           
protected  void initLmsFactory(LmsMessageConveyor lmsMessages)
           
protected  boolean isAppConnected(IGApplicationConfiguration appConfig, int appDbid)
           
protected  boolean isAppConnected(IGApplicationConfiguration appConfig, int appDbid, boolean checkClusterNodes)
           
protected  boolean isCurrentApp(IGApplicationConfiguration appConfig, int appDbid)
           
protected  boolean isCurrentHost(IGApplicationConfiguration appConfig, int hostDbid)
           
protected  boolean isHostConnected(IGApplicationConfiguration appConfig, int hostDbid)
           
protected  boolean isHostConnected(IGApplicationConfiguration appConfig, int hostDbid, boolean checkClusterNodes)
           
static GFApplicationConfigurationManager.ManagerBuilder newBuilder()
          Provides builder for application configuration manager instance.
Look at the builder documentation for the details on its usage - GFApplicationConfigurationManager.ManagerBuilder.
protected  void readTheApplication()
           
 void register(Action<GFAppCfgEvent> handler, Predicate<GFAppCfgEvent> filter)
          Registers an action to be performed when a publishing event occurs.
 void register(Subscriber<GFAppCfgEvent> subscriber)
          Registers a subscriber for notifications about publishing event.
 void unregister(Action<GFAppCfgEvent> handler)
          Unregisters a subscriber from notifications about publishing activities.
 void unregister(Subscriber<GFAppCfgEvent> subscriber)
          Unregisters a subscriber from notifications about publishing activities.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

appContext

protected GFApplicationConfigurationManager.GFApplicationContextImpl appContext

stateLock

protected final java.util.concurrent.locks.Lock stateLock

appConfig

protected GCOMApplicationConfiguration appConfig

lmsMessageConveyor

protected LmsMessageConveyor lmsMessageConveyor

lmsLoggerFactory

protected LmsLoggerFactory lmsLoggerFactory

lmsLogger

protected LmsEventLogger lmsLogger

theWarmStandby

protected WarmStandby theWarmStandby
Constructor Detail

GFApplicationConfigurationManager

protected GFApplicationConfigurationManager(java.lang.String appName,
                                            IConfService confService,
                                            WarmStandby warmStandby,
                                            boolean doCSSubscribe,
                                            boolean doCSDispose)
Protected constructor to share some logic for the private constructor and constructor of eventual child classes.

Parameters:
appName - name of the application to manage its configuration.
confService - the configuration service reference.
warmStandby - the WarmStandbyService created on the confServices protocol instance.
Method Detail

initLmsFactory

protected void initLmsFactory(LmsMessageConveyor lmsMessages)

newBuilder

public static GFApplicationConfigurationManager.ManagerBuilder newBuilder()
Provides builder for application configuration manager instance.
Look at the builder documentation for the details on its usage - GFApplicationConfigurationManager.ManagerBuilder.

Returns:
new instance of the manager builder.

getAppName

public java.lang.String getAppName()

getAppContext

public GFApplicationContext getAppContext()

init

public void init()
          throws ConfigurationException
Throws:
ConfigurationException

done

public void done()
          throws ConfigurationException
Throws:
ConfigurationException

register

public void register(Subscriber<GFAppCfgEvent> subscriber)
Description copied from interface: SubscriptionService
Registers a subscriber for notifications about publishing event.

Specified by:
register in interface SubscriptionService<GFAppCfgEvent>
Parameters:
subscriber - interface of subscriber object being registered

register

public void register(Action<GFAppCfgEvent> handler,
                     Predicate<GFAppCfgEvent> filter)
Description copied from interface: SubscriptionService
Registers an action to be performed when a publishing event occurs.

Specified by:
register in interface SubscriptionService<GFAppCfgEvent>
Parameters:
handler - represents the method that performs an action on the specified object when a publishing event occurs
filter - filter predicate that allows checking whether publishing event should be processed or ignored

unregister

public void unregister(Subscriber<GFAppCfgEvent> subscriber)
Description copied from interface: SubscriptionService
Unregisters a subscriber from notifications about publishing activities.

Specified by:
unregister in interface SubscriptionService<GFAppCfgEvent>
Parameters:
subscriber - interface of subscriber object being unregistered

unregister

public void unregister(Action<GFAppCfgEvent> handler)
Description copied from interface: SubscriptionService
Unregisters a subscriber from notifications about publishing activities.

Specified by:
unregister in interface SubscriptionService<GFAppCfgEvent>
Parameters:
handler - Represents the method that performs an action on the specified object when a publishing event occurs

readTheApplication

protected void readTheApplication()
                           throws ConfigurationException
Throws:
ConfigurationException
java.lang.IllegalArgumentException
java.lang.IllegalStateException

getNewConfig

protected GCOMApplicationConfiguration getNewConfig()

isCurrentApp

protected boolean isCurrentApp(IGApplicationConfiguration appConfig,
                               int appDbid)

isCurrentHost

protected boolean isCurrentHost(IGApplicationConfiguration appConfig,
                                int hostDbid)

isAppConnected

protected boolean isAppConnected(IGApplicationConfiguration appConfig,
                                 int appDbid,
                                 boolean checkClusterNodes)

isAppConnected

protected boolean isAppConnected(IGApplicationConfiguration appConfig,
                                 int appDbid)

isHostConnected

protected boolean isHostConnected(IGApplicationConfiguration appConfig,
                                  int hostDbid,
                                  boolean checkClusterNodes)

isHostConnected

protected boolean isHostConnected(IGApplicationConfiguration appConfig,
                                  int hostDbid)

getInvoker

protected AsyncInvoker getInvoker()

handleEvent

protected void handleEvent(GFAppCfgEvent appEvent)

handleEvent

protected void handleEvent(GFAppCfgEvent appEvent,
                           java.lang.Runnable task)

handleTask

protected void handleTask(java.lang.Runnable task)

doSubscription

protected void doSubscription()

Platform SDK Java 8.5 API Reference

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