public class ClusterClientConfigurationHelper
extends java.lang.Object
ClusterProtocol
configuration.
Usage samples:
// Take "my application configuration" from context, or read it in a way like this:
IGApplicationConfiguration myApp = new GCOMApplicationConfiguration(
confService.retrieveObject(CfgApplication.class,
new CfgApplicationQuery(myAppName)));
// For the first, try UCS 9 connection cluster:
List<WSConfig> conns = ClusterClientConfigurationHelper.createRefClusterProtocolEndpoints(
confService, myApp, CfgAppType.CFGContactServer);
if (conns == null || conns.isEmpty()) {
// If there is no UCS 9 cluster connected, then we try older UCS cluster, or simple UCS connection(s):
conns = ClusterClientConfigurationHelper.createClusterProtocolEndpoints(
myApp, CfgAppType.CFGContactServer);
}
ucsClusterProtocol.setNodes(conns);
// Take "my application configuration" from context, or read it in a way like this:
final IGApplicationConfiguration myApp = new GCOMApplicationConfiguration(
confService.retrieveObject(CfgApplication.class,
new CfgApplicationQuery(myAppName)));
IGApplicationConfiguration myClusterApp = null;
// if we do not have 'myClusterApp' from WCC context, we may take it by this way:
final List<IGAppConnConfiguration> clusters = GApplicationConfiguration
.getAppServers(myApp.getAppServers(), CfgAppType.CFGApplicationCluster);
if (clusters != null) {
if (clusters.size() == 1) {
myClusterApp = clusters.get(0).getTargetServerConfiguration();
log.infoFormat(
"Application is recognized as a node of cluster ''{0}''",
myClusterApp.getApplicationName());
} else if (clusters.size() > 1) {
log.error("Application has more than one application cluster connected"
+ " - its treated as a standalone app");
}
}
// Select application cluster connection start point:
final IGApplicationConfiguration connSrc = (myClusterApp != null) ? myClusterApp : myApp;
// For the first, try UCS 9 connection cluster:
List<WSConfig> conns = ClusterClientConfigurationHelper.createRefClusterProtocolEndpoints(
confService, connSrc, CfgAppType.CFGContactServer);
if (conns == null || conns.isEmpty()) {
// If there is no UCS 9 cluster connected, then we try older UCS cluster, or simple UCS connection(s):
conns = ClusterClientConfigurationHelper.createClusterProtocolEndpoints(
connSrc, CfgAppType.CFGContactServer);
}
ucsClusterProtocol.setNodes(conns);
ClusterProtocol.setNodes(nodes)
Constructor | Description |
---|---|
ClusterClientConfigurationHelper() |
Modifier and Type | Method | Description |
---|---|---|
static java.util.List<WSConfig> |
createClusterProtocolEndpoints(IGApplicationConfiguration clientApp,
IGApplicationConfiguration.IGAppConnConfiguration clusterConn,
CfgAppType serverType) |
Creates the list of
WSConfig for Cluster Protocol .It transparently supports both Cluster and legacy primary/backup WarmStanby configurations. |
static java.util.List<WSConfig> |
createClusterProtocolEndpoints(IGApplicationConfiguration clientApp,
CfgAppType serverType) |
Creates the list of
WSConfig for Cluster Protocol .It transparently supports both Cluster and legacy primary/backup WarmStanby configurations. |
static java.util.List<WSConfig> |
createRefClusterProtocolEndpoints(IConfService confService,
IGApplicationConfiguration clientApp,
IGApplicationConfiguration.IGAppConnConfiguration clusterConn,
CfgAppType serverType) |
Creates the list of
WSConfig for Cluster Protocol .If client application is connected to a cluster, then WSConfig objects will be created from cluster nodes of given serverType , which have references (connections)
to this application cluster application object.Only servers of the specified type will be included in the result WSConfig list. |
static java.util.List<WSConfig> |
createRefClusterProtocolEndpoints(IConfService confService,
IGApplicationConfiguration clientApp,
CfgAppType serverType) |
Creates the list of
WSConfig for Cluster Protocol .If client application is connected to a cluster, then WSConfig objects will be created from cluster nodes of given serverType , which have references (connections)
to this application cluster application object.Only servers of the specified type will be included in the result WSConfig list. |
public static java.util.List<WSConfig> createClusterProtocolEndpoints(IGApplicationConfiguration clientApp, CfgAppType serverType) throws ConfigurationException
WSConfig
for Cluster Protocol
.WSConfig
list.clientApp
- the client application that has connection to a cluster of servers
or to a single serverserverType
- type of the server(s) to create connection configuration toConfigurationException
public static java.util.List<WSConfig> createClusterProtocolEndpoints(IGApplicationConfiguration clientApp, IGApplicationConfiguration.IGAppConnConfiguration clusterConn, CfgAppType serverType) throws ConfigurationException
WSConfig
for Cluster Protocol
.WSConfig
list.clientApp
- the client application that has connection to a cluster of servers
or to a single serverclusterConn
- connection to the specific clusterserverType
- type of the server(s) to create connection configuration toConfigurationException
public static java.util.List<WSConfig> createRefClusterProtocolEndpoints(IConfService confService, IGApplicationConfiguration clientApp, CfgAppType serverType) throws ConfigurationException
WSConfig
for Cluster Protocol
.serverType
, which have references (connections)
to this application cluster application object.WSConfig
list.
Note: this type of application cluster is specific to Genesys WCC
based
applications like UCS 9.0
, GWE
, etc.confService
- the Configuration Server API service for reading of cluster nodesclientApp
- the client application that has connection to a cluster of servers
or to a single serverserverType
- type of the server(s) to create connection configuration toConfigurationException
public static java.util.List<WSConfig> createRefClusterProtocolEndpoints(IConfService confService, IGApplicationConfiguration clientApp, IGApplicationConfiguration.IGAppConnConfiguration clusterConn, CfgAppType serverType) throws ConfigurationException
WSConfig
for Cluster Protocol
.serverType
, which have references (connections)
to this application cluster application object.WSConfig
list.
Note: this type of application cluster is specific to Genesys WCC
based
applications like UCS 9.0
, GWE
, etc.confService
- the Configuration Server API service for reading of cluster nodesclientApp
- the client application that has connection to a cluster of servers
or to a single serverclusterConn
- connection to the specific clusterserverType
- type of the server(s) to create connection configuration toConfigurationException
Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 9.0.006.00
Copyright © 2006–2019 Genesys Telecommunications Laboratories, Inc. All rights reserved.