}
public ServicePoint getServicePoint(String serviceId, Module module)
{
checkShutdown();
ServicePoint result = (ServicePoint) _servicePoints.get(serviceId);
if (result == null)
{
if (serviceId.indexOf('.') == -1)
{
final List possibleMatches = getMatchingServiceIds(serviceId);
if (!possibleMatches.isEmpty())
{
final StringBuffer sb = new StringBuffer();
for (Iterator i = possibleMatches.iterator(); i.hasNext();)
{
final String matching = (String) i.next();
sb.append('\"');
sb.append(matching);
sb.append('\"');
if (i.hasNext())
{
sb.append(", ");
}
}
throw new ApplicationRuntimeException(ImplMessages.unqualifiedServicePoint(
serviceId,
sb.toString()));
}
}
throw new ApplicationRuntimeException(ImplMessages.noSuchServicePoint(serviceId));
}
if (!result.visibleToModule(module))
throw new ApplicationRuntimeException(ImplMessages.serviceNotVisible(serviceId, module));
return result;
}