Summary: This section presents
the design and use of the Config Adapter Application Block.
Description of the ConfigAdapter Application Block
The ConfigAdapter provides a java object model over Config PSDK.
Benefits
Takes care of the protocol
The config protocol and its traps are managed by the
ConfigAdapter. The cryptic xml flow is translated into well-formed
objects and events.
Cache
Objects loaded through the ConfigAdapter are cached
locally. Following access to those objects is dramatically
improved. Objects in cache are, of course, always synchronized with
the configuration layer.
High-Availability
Connection and high-availability are managed by the
ConfigAdapter. Switchovers occur transparently and the local cache is
kept up-to-date. The user can also register for notifications of the
connection status.
Config Listeners
You can register a listener that will send a message whenever an
object is created, updated or deleted. An update message is
consolidated and contains both a Delta object that represents the
modifications that have occurred and the object as it is after the
modification.
Background and reliability
CacheAdapter was originally written as a component of Agent
Interaction SDK. It is thus being used in production for years through
the Genesys Desktop, the Genesys Supervisor Desktop, the Genesys
Integration Server, the GSAP adapters, as well as many AIL
customers.
Package description
Lib
All the libraries you need are provided in this directory. Place
them all in your CLASSPATH
.
Javadoc
The documentation of the ConfigAdapter classes you need to know is
located in this directory.
They are all located in the same package. You can notice four kinds
of classes:
ConfigEnums
These classes are enumerators. Each value has two
constants, XXX
of type ConfigEnum
and XXX
_ of type int for switch-case purposes.
ConfigStructs
These classes are structures ; each object type in the
configuration layer is represented by one of these. A Person object in
CME is represented by a ConfigStructPerson.
ConfigRequests
Requests are sent to the ConfigAdapter as objects of
type ConfigRequest
.
ConfigEvents
The ConfigAdapter sends events in the form
of ConfigEvents
.
Src
The source code of the ConfigAdapter is provided, but you probably
don't need to care about it. You would rather open ConfigAdapter.java,
which you can edit so that it meets your needs. The startup.java file
is an example of usage of ConfigAdapter.java.
Features
Connection
Instantiate a ConfigAdapter
object and call one of
its connect()
methods. This will send
a ConfigRequestConnect
and wait for the corresponding
ConfigEventConnected.
The ConfigAdapter creates and links together several components you
don't need to care about.
Reading objects
Getting objects from the Configuration Layer is achieved by sending
a ConfigRequestGetObjects and reading the corresponding
ConfigEventObjects. This is what the ConfigAdapter.getObjects()
methods do. The parameter ObjectType is mandatory. You can also add
one or more conditions to refine your request.
Conditions
A conditions is made of a ConfigEnumKey
and a
value. Be sure to pass a value of the right type.
ConfigEnumKey Expected value type Appliable to
ConfigEnumObjectType
APPLICATION_TYPE ConfigEnumClientType APPLICATION
DBID Integer Any kind of object
DBIDS Collection of Integer Any kind of objects
DN_DBID Integer PLACE
DN_TYPE ConfigEnumDNType DN
EMPLOYEE_ID String PERSON
ENUMERATOR_DBID Integer ENUMERATOR_VALUE
IS_AGENT Boolean PERSON
LOGIN_DBID Integer PERSON
NAME String Any kind of object
PERSON_DBID Integer AGENTGROUP
PLACE_DBID Integer PLACEGROUP
SCRIPT_TYPE ConfigEnumScriptType SCRIPT
SWITCH_DBID Integer DN
TENANT_DBID Integer Any kind of object
Value type and validity of the
ConfigEnumKeys
Delegate
The access right of the ConfigAdapter are those of the application
you connect with. If your application is of type ThirdPartyServer,
then the rights are defined in the Security tab of your application in
the CME. If your application is of type ThirdPartyClient,
ConfigAdapter has the rights of the user you pass in the
ConfigRequestConnect, or the ConfigAdapter.connect()
method.
If your application is a server that has to reflect different
security configuration for different users, you can do it with the
delegate parameter. Simply pass your agent DBID to the
ConfigRequestGetObjects.setDelegateDBID()
method.
Listener
You can register a listener for objects modifications. You will be
notified of any object modification that happens in the CME within
your access rights.