Platform SDK Java 8.5 API Reference

com.genesyslab.platform.apptemplate.filtering
Class FilterConfigurationHelper

java.lang.Object
  extended by com.genesyslab.platform.apptemplate.filtering.FilterConfigurationHelper

public class FilterConfigurationHelper
extends java.lang.Object

Platform SDK protocols log most of the Message content (except secure fields) when debug level is enabled. It is possible to assign message filter for the protocol object with setLogMessageFilter(filter) method to filter out unneeded messages and thus reduce log volume.

The FilterConfigurationHelper assigns default log filter implementation to the protocol object. Default implementation supports filter configuration from CME and handles configuration updates at runtime. It is possible to modify filter options in CME for the opened protocol.

Here is a sample how to create protocol and assign default message filter implementation using apptemplate helpers:

 
   String appName = "<my-app-name>";
   CfgApplication cfgApplication = confService.retrieveObject(
           CfgApplication.class, new CfgApplicationQuery(appName));
 
   GCOMApplicationConfiguration appConfiguration =
           new GCOMApplicationConfiguration(cfgApplication);
 
   IGAppConnConfiguration connConfig = appConfiguration.getAppServer(CfgAppType.CFGStatServer);
 
   Endpoint epStatSrv = ClientConfigurationHelper.createEndpoint(
               appConfiguration, connConfig,
               connConfig.getTargetServerConfiguration());
 
   StatServerProtocol statProtocol = new StatServerProtocol(epStatSrv);
   statProtocol.setClientName(clientName);
    
   FilterConfigurationHelper.bind(statProtocol, appConfiguration, confService);
 
   statProtocol.open();  
 
 
When protocol object is not required anymore, release assigned filters.
 
   FilterConfigurationHelper.unbind(statProtocol, confService);
 
 
See "Message Filter User guide" how to define filters in CME.


Constructor Summary
FilterConfigurationHelper()
           
 
Method Summary
static void bind(DuplexChannel protocol, IGApplicationConfiguration cfgApplication, IConfService service)
          Binds default message filter implementation with a protocol object.
static void bind(DuplexChannel protocol, java.lang.String applicationName, IConfService service)
          Binds default message filter implementation with a protocol object.
static void unbind(DuplexChannel protocol, IConfService service)
          Unregisters filter from protocol object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilterConfigurationHelper

public FilterConfigurationHelper()
Method Detail

bind

public static void bind(DuplexChannel protocol,
                        java.lang.String applicationName,
                        IConfService service)
                 throws ConfigurationException
Binds default message filter implementation with a protocol object. Filters can receive configuration updates from Config Server at runtime.

Parameters:
protocol - Protocol.
applicationName - Name of application where protocol and filters are defined.
service - ConfService to read application and subscribe for configuration updates notification.
Throws:
ConfigurationException

bind

public static void bind(DuplexChannel protocol,
                        IGApplicationConfiguration cfgApplication,
                        IConfService service)
                 throws ConfigurationException
Binds default message filter implementation with a protocol object. Filters can receive configuration updates from Config Server at a runtime.

Parameters:
protocol - Protocol.
cfgApplication - Application where protocol and filters are defined.
service - ConfService to subscribe for configuration updates notification.
Throws:
ConfigurationException

unbind

public static void unbind(DuplexChannel protocol,
                          IConfService service)
                   throws ConfigurationException
Unregisters filter from protocol object.

Parameters:
protocol - Protocol.
service - ConfService to unsubscribe from configuration updates notification.
Throws:
ConfigurationException

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.