Hi all,
I would like to learn your opinions on how to detect TServer disconnect (or communication failure with TServer) for Protocol Management Service Implementation.
Using the following code segment, I get connected to the TServer:
[code]
this.ctiServerConfiguration = new TServerConfiguration(
EventCollectorConfig.getInstance().getConf().getCTI()
.getAppName());
this.ctiServerConfiguration.setUseAddp(true);
this.ctiServerConfiguration.setAddpServerTimeout(10);
this.ctiServerConfiguration.setAddpClientTimeout(10);
this.ctiServerConfiguration.setClientName("EVENT_AGG_SERV");
URI ctiURI = null;
try {
ctiURI = new URI("tcp://"
+ EventCollectorConfig.getInstance().getConf().getCTI()
.getHost()
+ ":"
+ EventCollectorConfig.getInstance().getConf().getCTI()
.getPort());
this.ctiServerConfiguration.setUri(ctiURI);
} catch (URISyntaxException e) {
throw e;
}
this.pmsi = new ProtocolManagementServiceImpl();
this.pmsi.register(this.ctiServerConfiguration);
// Initialize event broker
mEventBrokerService = BrokerServiceFactory.CreateEventBroker(pmsi
mEventBrokerService.activate();
// Open connection with T-Server:
try {
this.pmsi.getProtocol(
EventCollectorConfig.getInstance().getConf().getCTI()
.getAppName()).open();
logger.info("[GenesysAsynchEventReceiver][Open][Event Broker Service is active and open]");
} catch (ProtocolException e) {
throw e;
} catch (IllegalStateException e) {
throw e;
} catch (InterruptedException e) {
throw e;
} catch (Exception e)
{
throw e;
}[/code]
Thank you in advance.
Regards,
Ali