Mercurial > hg > monetdb-java
changeset 876:e2e7f0d72c95
Add Parameter#isTlsOnly method
author | Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com> |
---|---|
date | Tue, 27 Feb 2024 11:36:23 +0100 (13 months ago) |
parents | 06f532009fda |
children | f31366ece930 |
files | src/main/java/org/monetdb/mcl/net/Parameter.java |
diffstat | 1 files changed, 19 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/org/monetdb/mcl/net/Parameter.java +++ b/src/main/java/org/monetdb/mcl/net/Parameter.java @@ -155,4 +155,23 @@ public enum Parameter { return defaultValue; } } + + /** + * Determine if this Parameter is onlyu relevant when TlS is enabled. + * + * Such parameters need not be shown to the user unless the URL starts with <code>monetdbs://</code>. + * + * @return true if this Parameter is only relevant when TLS is enabled + */ + public boolean isTlsOnly() { + switch (this) { + case CERT: + case CERTHASH: + case CLIENTCERT: + case CLIENTKEY: + return true; + default: + return false; + } + } }