Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/392.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 使用平台SDK的位置列表 背景_Java_Genesys - Fatal编程技术网

Java 使用平台SDK的位置列表 背景

Java 使用平台SDK的位置列表 背景,java,genesys,Java,Genesys,我的应用程序连接到Genesys交互服务器,以便接收在交互工作区上执行的操作的事件。我正在使用面向Java的平台SDK 8.5。 我使用API参考中描述的方法连接到交互服务器 InteractionServerProtocol interactionServerProtocol = new InteractionServerProtocol( new Endpoint( endpointName,

我的应用程序连接到Genesys交互服务器,以便接收在交互工作区上执行的操作的事件。我正在使用面向Java的平台SDK 8.5。

我使用API参考中描述的方法连接到交互服务器

 InteractionServerProtocol interactionServerProtocol =
         new InteractionServerProtocol(
             new Endpoint(
                   endpointName,
                   interactionServerHost,
                   interactionServerPort));
   interactionServerProtocol.setClientType(InteractionClient.AgentApplication);
   interactionServerProtocol.open();
接下来,我需要为我希望接收事件的每个地方注册一个侦听器

RequestStartPlaceAgentStateReporting requestStartPlaceAgentStateReporting = RequestStartPlaceAgentStateReporting.create();
requestStartPlaceAgentStateReporting.setPlaceId("PlaceOfGold");
requestStartPlaceAgentStateReporting.setTenantId(101);
isProtocol.send(requestStartPlaceAgentStateReporting);  
现在,我的应用程序要求用户手动指定他希望观察的每个地方。这就要求他知道所有地方的名字,而这些地方他不一定(容易)进入。

问题:
如何以编程方式获取可用位置的列表?最好是通过交互服务器来限制所需的连接数。

有一种方法可以使用。如果您检查applicationblocks的方法,您将看到cfg和查询对象。您可以使用它来获取所有DNs的列表。在生成查询时,请尝试空白DBID、name和number

有一个.net代码类似于java代码(实际上完全相同)

List List=新列表();
List dnlist=新列表();
CfgDNQuery query=新的CfgDNQuery(m_ConfService);
list=m_ConfService.RetrieveMultipleObjects(query.ToList();
foreach(列表中的CfgDN项)
{
foo=(DN)item.DBID;
......
dnlist.Add(foo);
}
注意:DN是我的类,它包含来自平台SDK的一些属性

KeyValueCollection tenantList = new KeyValueCollection();
tenantList.addString("tenant", "Resources");
RequestStartPlaceAgentStateReportingAll all = RequestStartPlaceAgentStateReportingAll.create(tenantList);
interactionServerProtocol.send(all);
KeyValueCollection tenantList = new KeyValueCollection();
tenantList.addString("tenant", "Resources");
RequestStartPlaceAgentStateReportingAll all = RequestStartPlaceAgentStateReportingAll.create(tenantList);
interactionServerProtocol.send(all);