Cisco Cisco Computer Telephony Integration Option 9.0 Developer's Guide

Page of 546
 
Chapter 4      Building Your Application
Working with Skill Group Statistics
4-62
Cisco ICM Software CTI OS Developer’s Guide Release 6.0(0)
The following example demonstrates this task in Java:
/* 1. Create session.*/
CtiOsSession rSession = new CtiOsSession();
/* 2. Add event listener.*/
rSession.AddEventListener(this, 
 CtiOs_Enums.SubscriberList.eSessionList);
rSession.AddEventListener(this, 
 CtiOs_Enums.SubscriberList.eSkillGroupList);
/* 3. Set Connection values.*/
Arguments rArgs = new Arguments();
rArgs.SetValue(CTIOS_CTIOSA, “CTIOSServerA”);
rArgs.SetValue(CTIOS_PORTA, 42408);
rArgs.SetValue(CTIOS_CTIOSB, “CTIOSServerB”);
rArgs.SetValue(CTIOS_PORTB, 42408);
rArgs.SetValue(CTIOS_HEARTBEAT, 100);
/*4. Connect to server.*.
int returnCode = session.Connect(rArgs);
/*5. Set the message filter. */
String filter = S_FILTERTARGET + "=" + CTIOS_SKILLGROUPSTATISTICS;
rArgs = new Arguments();
rArgs.SetValue(CtiOs_IKeywordIDs.CTIOS_FILTER, filter);
returnCode = session.SetMessageFilter(rArgs);
/*6. Enable statistics. */
rArgs = new Arguments();
rArgs.SetValue(CTIOS_SKILLGROUPID, sgID);
rArgs.SetValue(CTIOS_PERIPHERALID, peripheralID);
rSession.EnableSkillGroupStatistics(rArgs);
Accessing Skill Group Statistics
Overview
Once the application is set up to receive skill group statistics, as described in the 
preceding section, you access skill group statistics through an event handler. The 
name of the event depends on the language of the application:
In Java, eOnNewSkillGroupStatisticsEvent() 
In C++, COM, or VB, OnSkillGroupStatisticsUpdated()