@@ -209,22 +209,22 @@ protected void configureServerSocket(SSLServerSocket socket) {
209
209
/*
210
210
* Is the server ready to serve?
211
211
*/
212
- private final CountDownLatch serverCondition = new CountDownLatch (1 );
212
+ protected final CountDownLatch serverCondition = new CountDownLatch (1 );
213
213
214
214
/*
215
215
* Is the client ready to handshake?
216
216
*/
217
- private final CountDownLatch clientCondition = new CountDownLatch (1 );
217
+ protected final CountDownLatch clientCondition = new CountDownLatch (1 );
218
218
219
219
/*
220
220
* What's the server port? Use any free port by default
221
221
*/
222
- private volatile int serverPort = 0 ;
222
+ protected volatile int serverPort = 0 ;
223
223
224
224
/*
225
225
* Define the server side of the test.
226
226
*/
227
- private void doServerSide () throws Exception {
227
+ protected void doServerSide () throws Exception {
228
228
// kick start the server side service
229
229
SSLContext context = createServerSSLContext ();
230
230
SSLServerSocketFactory sslssf = context .getServerSocketFactory ();
@@ -470,7 +470,15 @@ public static SSLContext createSSLContext(
470
470
* Both sides can throw exceptions, but do you have a preference
471
471
* as to which side should be the main thread.
472
472
*/
473
- private static final boolean separateServerThread = false ;
473
+ private final boolean separateServerThread ;
474
+
475
+ public SSLSocketTemplate () {
476
+ this (false );
477
+ }
478
+
479
+ public SSLSocketTemplate (boolean sepSrvThread ) {
480
+ this .separateServerThread = sepSrvThread ;
481
+ }
474
482
475
483
/*
476
484
* Boot up the testing, used to drive remainder of the test.
0 commit comments