use of com.helger.smpclient.url.IBDXLURLProvider in project phoss-smp by phax.
the class SMPRestDataProvider method _getDynamicParticipantURLHostName.
@Nonnull
private String _getDynamicParticipantURLHostName() {
String ret = null;
final ISMPURLProvider aURLProvider = SMPMetaManager.getSMPURLProvider();
try {
if (aURLProvider instanceof IPeppolURLProvider)
ret = ((IPeppolURLProvider) aURLProvider).getDNSNameOfParticipant(m_aParticipantID, m_sSMLZoneName);
else if (aURLProvider instanceof IBDXLURLProvider) {
// Fallback by not resolving the NAPTR
ret = ((IBDXLURLProvider) aURLProvider).getDNSNameOfParticipant(m_aParticipantID, m_sSMLZoneName);
}
} catch (final SMPDNSResolutionException ex) {
// Ignore
}
if (ret == null)
throw new IllegalStateException("Failed to resolve host name for '" + m_aParticipantID.getURIEncoded() + "' and SML zone name '" + m_sSMLZoneName + "'");
return ret;
}
Aggregations