String key = lookUpDelegateKey(delegateEndpoints[i].getEndpoint());
if (key != null && destinationMap.containsKey(key)) {
Endpoint endpoint = ((Endpoint) destinationMap.get(key));
if (key != null && endpoint != null) {
ServiceInfo serviceInfo = endpoint.getServiceInfo();
PrimitiveServiceInfo pServiceInfo = new PrimitiveServiceInfo(endpoint.isCasMultiplier(), null);
pServiceInfo.setBrokerURL(serviceInfo.getBrokerURL());
pServiceInfo.setInputQueueName(serviceInfo.getInputQueueName());
if (endpoint.getDestination() != null) {
pServiceInfo.setReplyQueueName(endpoint.getDestination().toString());
}
pServiceInfo.setServiceKey(key);
pServiceInfo.setState(serviceInfo.getState());
pServiceInfo.setAnalysisEngineInstanceCount(1);
registerWithAgent(pServiceInfo, super.getManagementInterface().getJmxDomain()
+ super.jmxContext + ",r" + remoteIndex + "=" + key
+ " [Remote Uima EE Service],name=" + key + "_" + serviceInfo.getLabel());