} else {
endpointId = String.valueOf(getNextEndpointId());
transportAddress = new TransportAddress(_nodeId, TransportAddress.LOCAL_SERVICE_CONNECTION, endpointId);
}
TransportEndpointSite endpointSite;
synchronized (this) {
endpointSite = _endpointMap.get(endpointId);
if (endpointSite != null) {
// already attached
return endpointSite;
}
endpointSite = new TransportEndpointSite(this, endpoint, transportAddress);
_endpointMap.put(endpointId, endpointSite);
}
endpoint.onAttachConfirm(true, transportAddress.toString());
return endpointSite;