* @param provider
* @param externalEndpoint the external endpoint to be registered, must be non-null.
* @throws JBIException
*/
public void registerExternalEndpoint(ComponentNameSpace cns, ServiceEndpoint externalEndpoint) throws JBIException {
ExternalEndpoint serviceEndpoint = new ExternalEndpoint(cns, externalEndpoint);
if (externalEndpoints.get(getKey(serviceEndpoint)) != null) {
throw new JBIException("An external endpoint for service " + externalEndpoint.getServiceName() + " and endpoint " + externalEndpoint.getEndpointName() + " is already registered");
}
registerEndpoint(serviceEndpoint);
externalEndpoints.put(getKey(serviceEndpoint), serviceEndpoint);