[core] Add ConnectionConfiguration.getHostString()

This commit is contained in:
Florian Schmaus 2022-05-18 21:45:00 +02:00
parent 9b6e209b5f
commit 00bcbff5ee
1 changed files with 10 additions and 0 deletions

View File

@ -302,6 +302,16 @@ public abstract class ConnectionConfiguration {
return new SmackTlsContext(context, daneVerifier);
}
public String getHostString() {
if (hostAddress != null) {
return hostAddress.toString();
}
if (host != null) {
return host.toString();
}
return xmppServiceDomain.toString();
}
public DnsName getHost() {
return host;
}