@@ -1216,9 +1216,6 @@ static public class Bean implements Serializable {
1216
1216
private DatabaseClient .ConnectionType connectionType ;
1217
1217
private HandleFactoryRegistry handleRegistry =
1218
1218
HandleFactoryRegistryImpl .newDefault ();
1219
- private String certFile ;
1220
- private String certPassword ;
1221
- private X509TrustManager trustManager ;
1222
1219
1223
1220
transient private SSLContext context ;
1224
1221
transient private SSLHostnameVerifier verifier ;
@@ -1233,18 +1230,6 @@ public Bean() {
1233
1230
super ();
1234
1231
}
1235
1232
1236
- public Bean (String host , int port ) {
1237
- this .host = host ;
1238
- this .port = port ;
1239
- }
1240
-
1241
- public Bean (String host , int port , String username , String password ) {
1242
- this .host = host ;
1243
- this .port = port ;
1244
- this .user = username ;
1245
- this .password = password ;
1246
- this .authentication = Authentication .DIGEST ;
1247
- }
1248
1233
1249
1234
/**
1250
1235
* Returns the host for clients created with a
@@ -1457,29 +1442,6 @@ public DatabaseClient.ConnectionType getConnectionType() {
1457
1442
public void setConnectionType (DatabaseClient .ConnectionType connectionType ) {
1458
1443
this .connectionType = connectionType ;
1459
1444
}
1460
- public String getCertFile () {
1461
- return certFile ;
1462
- }
1463
-
1464
- public void setCertFile (String certFile ) {
1465
- this .certFile = certFile ;
1466
- }
1467
-
1468
- public String getCertPassword () {
1469
- return certPassword ;
1470
- }
1471
-
1472
- public void setCertPassword (String certPassword ) {
1473
- this .certPassword = certPassword ;
1474
- }
1475
-
1476
- public X509TrustManager getTrustManager () {
1477
- return trustManager ;
1478
- }
1479
-
1480
- public void setTrustManager (X509TrustManager trustManager ) {
1481
- this .trustManager = trustManager ;
1482
- }
1483
1445
1484
1446
/**
1485
1447
* Returns the registry for associating
@@ -1513,10 +1475,9 @@ public void registerDefaultHandles() {
1513
1475
* The client accesses the database by means of a REST server.
1514
1476
* @return a new client for making database requests
1515
1477
*/
1516
- public DatabaseClient newClient () {
1478
+ public DatabaseClient newClient () {
1517
1479
DatabaseClientImpl client = (DatabaseClientImpl ) DatabaseClientFactory .newClient (
1518
- host , port , database ,
1519
- makeSecurityContext (user , password , authentication , context , verifier ),
1480
+ host , port , database , (securityContext !=null ? securityContext :makeSecurityContext (user , password , authentication , context , verifier )),
1520
1481
connectionType );
1521
1482
client .setHandleRegistry (getHandleRegistry ().copy ());
1522
1483
return client ;
0 commit comments