| 1 |
/* |
| 2 |
* Copyright 2015-2020 the original author or authors |
| 3 |
* |
| 4 |
* This software is licensed under the Apache License, Version 2.0, |
| 5 |
* the GNU Lesser General Public License version 2 or later ("LGPL") |
| 6 |
* and the WTFPL. |
| 7 |
* You may choose either license to govern your use of this software only |
| 8 |
* upon the condition that you accept all of the terms of either |
| 9 |
* the Apache License 2.0, the LGPL 2.1+ or the WTFPL. |
| 10 |
*/ |
| 11 |
package org.minidns.hla.srv; |
| 12 |
|
| 13 |
import org.minidns.dnslabel.DnsLabel; |
| 14 |
|
| 15 |
public enum SrvService { |
| 16 |
|
| 17 |
// @formatter:off |
| 18 |
xmpp_client, |
| 19 |
xmpp_server, |
| 20 |
|
| 21 |
/** |
| 22 |
* XMPP client-to-server (c2s) connections using implicit TLS (also known as "Direct TLS"). |
| 23 |
* |
| 24 |
* @see <a href="https://xmpp.org/extensions/xep-0368.html">XEP-0368: SRV records for XMPP over TLS</a> |
| 25 |
*/ |
| 26 |
xmpps_client, |
| 27 |
|
| 28 |
/** |
| 29 |
* XMPP server-to-server (s2s) connections using implicit TLS (also known as "Direct TLS"). |
| 30 |
* |
| 31 |
* @see <a href="https://xmpp.org/extensions/xep-0368.html">XEP-0368: SRV records for XMPP over TLS</a> |
| 32 |
*/ |
| 33 |
xmpps_server, |
| 34 |
; |
| 35 |
// @formatter:on |
| 36 |
|
| 37 |
public final DnsLabel dnsLabel; |
| 38 |
|
| 39 |
SrvService() { |
| 40 |
String enumName = name().replaceAll("_", "-"); |
| 41 |
dnsLabel = DnsLabel.from('_' + enumName); |
| 42 |
} |
| 43 |
} |