11package com .marklogic .client .ext ;
22
3+ import com .marklogic .client .DatabaseClient ;
34import com .marklogic .client .DatabaseClientFactory .SSLHostnameVerifier ;
45
56import javax .net .ssl .SSLContext ;
@@ -12,92 +13,93 @@ public class DatabaseClientConfig {
1213
1314 private SecurityContextType securityContextType = SecurityContextType .DIGEST ;
1415 private String host ;
15- private int port ;
16- private String username ;
17- private String password ;
18- private String database ;
19- private SSLContext sslContext ;
20- private SSLHostnameVerifier sslHostnameVerifier ;
21- private String certFile ;
22- private String certPassword ;
23- private String externalName ;
24- private X509TrustManager trustManager ;
16+ private int port ;
17+ private String username ;
18+ private String password ;
19+ private String database ;
20+ private SSLContext sslContext ;
21+ private SSLHostnameVerifier sslHostnameVerifier ;
22+ private String certFile ;
23+ private String certPassword ;
24+ private String externalName ;
25+ private X509TrustManager trustManager ;
26+ private DatabaseClient .ConnectionType connectionType ;
2527
2628 public DatabaseClientConfig () {
27- }
29+ }
2830
29- public DatabaseClientConfig (String host , int port ) {
30- this .host = host ;
31- this .port = port ;
32- }
31+ public DatabaseClientConfig (String host , int port ) {
32+ this .host = host ;
33+ this .port = port ;
34+ }
3335
34- public DatabaseClientConfig (String host , int port , String username , String password ) {
35- this .host = host ;
36- this .port = port ;
37- this .username = username ;
38- this .password = password ;
39- }
36+ public DatabaseClientConfig (String host , int port , String username , String password ) {
37+ this .host = host ;
38+ this .port = port ;
39+ this .username = username ;
40+ this .password = password ;
41+ }
4042
41- @ Override
42- public String toString () {
43- return String .format ("[%s@%s:%d]" , username , host , port , username );
44- }
43+ @ Override
44+ public String toString () {
45+ return String .format ("[%s@%s:%d]" , username , host , port , username );
46+ }
4547
46- public String getHost () {
47- return host ;
48- }
48+ public String getHost () {
49+ return host ;
50+ }
4951
50- public int getPort () {
51- return port ;
52- }
52+ public int getPort () {
53+ return port ;
54+ }
5355
54- public String getUsername () {
55- return username ;
56- }
56+ public String getUsername () {
57+ return username ;
58+ }
5759
58- public String getPassword () {
59- return password ;
60- }
60+ public String getPassword () {
61+ return password ;
62+ }
6163
62- public void setHost (String host ) {
63- this .host = host ;
64- }
64+ public void setHost (String host ) {
65+ this .host = host ;
66+ }
6567
66- public void setPort (int port ) {
67- this .port = port ;
68- }
68+ public void setPort (int port ) {
69+ this .port = port ;
70+ }
6971
70- public void setUsername (String username ) {
71- this .username = username ;
72- }
72+ public void setUsername (String username ) {
73+ this .username = username ;
74+ }
7375
74- public void setPassword (String password ) {
75- this .password = password ;
76- }
76+ public void setPassword (String password ) {
77+ this .password = password ;
78+ }
7779
78- public SSLContext getSslContext () {
79- return sslContext ;
80- }
80+ public SSLContext getSslContext () {
81+ return sslContext ;
82+ }
8183
82- public void setSslContext (SSLContext sslContext ) {
83- this .sslContext = sslContext ;
84- }
84+ public void setSslContext (SSLContext sslContext ) {
85+ this .sslContext = sslContext ;
86+ }
8587
86- public SSLHostnameVerifier getSslHostnameVerifier () {
87- return sslHostnameVerifier ;
88- }
88+ public SSLHostnameVerifier getSslHostnameVerifier () {
89+ return sslHostnameVerifier ;
90+ }
8991
90- public void setSslHostnameVerifier (SSLHostnameVerifier sslHostnameVerifier ) {
91- this .sslHostnameVerifier = sslHostnameVerifier ;
92- }
92+ public void setSslHostnameVerifier (SSLHostnameVerifier sslHostnameVerifier ) {
93+ this .sslHostnameVerifier = sslHostnameVerifier ;
94+ }
9395
94- public String getDatabase () {
95- return database ;
96- }
96+ public String getDatabase () {
97+ return database ;
98+ }
9799
98- public void setDatabase (String database ) {
99- this .database = database ;
100- }
100+ public void setDatabase (String database ) {
101+ this .database = database ;
102+ }
101103
102104 public SecurityContextType getSecurityContextType () {
103105 return securityContextType ;
@@ -138,4 +140,12 @@ public X509TrustManager getTrustManager() {
138140 public void setTrustManager (X509TrustManager trustManager ) {
139141 this .trustManager = trustManager ;
140142 }
143+
144+ public DatabaseClient .ConnectionType getConnectionType () {
145+ return connectionType ;
146+ }
147+
148+ public void setConnectionType (DatabaseClient .ConnectionType connectionType ) {
149+ this .connectionType = connectionType ;
150+ }
141151}
0 commit comments