Action<GFAppCfgEvent>
, Subscriber<GFAppCfgEvent>
GFAppLog4j2Updater
public abstract class GFAppCfgLogOptionsEventListener extends GFAppCfgOptionsEventListener
GFApplicationConfigurationManager
).
It allows applications to implement automatic configuration update for
custom/own logging frameworks.
GFApplicationConfigurationManager appManager =
GFApplicationConfigurationManager.createManager(confService);
appManager.register(new MyLogFwkConfigurer());
appManager.init();
public class MyLogFwkConfigurer extends GFAppCfgLogOptionsEventListener {
GFAppLog4j2Updater
Modifier and Type | Class | Description |
---|---|---|
protected static class |
GFAppCfgLogOptionsEventListener.TheAppLogOptionsFilter |
GFAppCfgOptionsEventListener.TheAppConfigDataFilter
Modifier and Type | Field | Description |
---|---|---|
protected static java.lang.String |
LOG_EXT_SECTION_NAME |
|
protected static java.lang.String |
LOG_SECTION_NAME |
|
static Predicate<GFAppCfgEvent> |
THE_APP_LOG_OPTIONS_FILTER |
THE_APP_CONFIGDATA_FILTER
Constructor | Description |
---|---|
GFAppCfgLogOptionsEventListener() |
Modifier and Type | Method | Description |
---|---|---|
protected boolean |
applyLoggingOptions(GFApplicationContext appCtx,
IGApplicationConfiguration appConfig,
CfgDeltaApplication deltaApp,
LmsMessageConveyor lmsMessages) |
Applies new logging options to given
LmsMessagesConveyor . |
protected static boolean |
containsMessageServerConnection(java.util.Collection<CfgConnInfo> connections) |
|
protected static boolean |
diffSection(KeyValueCollection opts1,
KeyValueCollection opts2,
java.lang.String section) |
|
Predicate<GFAppCfgEvent> |
getFilter() |
Gets filter predicate that allows checking whether publishing
event should be processed or ignored.
|
void |
handle(GFAppCfgEvent event) |
This method will be called on configuration managers'
GFAppCfgEvent after applying
of the application configuration options event filter GFAppCfgOptionsEventListener.getFilter()
(returning GFAppCfgOptionsEventListener.THE_APP_CONFIGDATA_FILTER ).This filter passes GFAppCfgEvent.AppCfgEventType.AppConfigReceived and GFAppCfgEvent.AppCfgEventType.AppConfigUpdated
events only. |
protected static boolean |
logOptionsChanged(GFApplicationContext appCtx,
IGApplicationConfiguration appConfig,
CfgDeltaApplication deltaApp) |
|
protected void |
onAppConfigReceived(GFApplicationContext appCtx,
IGApplicationConfiguration appConfig) |
|
protected void |
onAppConfigUpdated(GFApplicationContext appCtx,
IGApplicationConfiguration appConfig,
CfgDeltaApplication deltaApp) |
protected static final java.lang.String LOG_SECTION_NAME
protected static final java.lang.String LOG_EXT_SECTION_NAME
public static final Predicate<GFAppCfgEvent> THE_APP_LOG_OPTIONS_FILTER
public Predicate<GFAppCfgEvent> getFilter()
Subscriber
getFilter
in interface Subscriber<GFAppCfgEvent>
getFilter
in class GFAppCfgOptionsEventListener
public void handle(GFAppCfgEvent event)
GFAppCfgOptionsEventListener
GFAppCfgEvent
after applying
of the application configuration options event filter GFAppCfgOptionsEventListener.getFilter()
(returning GFAppCfgOptionsEventListener.THE_APP_CONFIGDATA_FILTER
).GFAppCfgEvent.AppCfgEventType.AppConfigReceived
and GFAppCfgEvent.AppCfgEventType.AppConfigUpdated
events only.handle
in interface Action<GFAppCfgEvent>
handle
in class GFAppCfgOptionsEventListener
protected void onAppConfigReceived(GFApplicationContext appCtx, IGApplicationConfiguration appConfig)
protected void onAppConfigUpdated(GFApplicationContext appCtx, IGApplicationConfiguration appConfig, CfgDeltaApplication deltaApp)
protected boolean applyLoggingOptions(GFApplicationContext appCtx, IGApplicationConfiguration appConfig, CfgDeltaApplication deltaApp, LmsMessageConveyor lmsMessages)
LmsMessagesConveyor
.appCtx
- the application configuration managers context.appConfig
- the new application configuration to apply.deltaApp
- the application delta object caused the configuration update, or null.lmsMessages
- the LMS messages conveyor to update correspondent options to.true
- if lmsMessages
was updated with new configuration,
false
- if appConfig
or lmsMessages
is null.protected static boolean logOptionsChanged(GFApplicationContext appCtx, IGApplicationConfiguration appConfig, CfgDeltaApplication deltaApp)
protected static boolean containsMessageServerConnection(java.util.Collection<CfgConnInfo> connections)
protected static boolean diffSection(KeyValueCollection opts1, KeyValueCollection opts2, java.lang.String section)
Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 9.0.006.00
Copyright © 2006–2019 Genesys Telecommunications Laboratories, Inc. All rights reserved.