Platform SDK Java 8.5 API Reference

com.genesyslab.platform.commons.connection
Interface StartTLSSupport


public interface StartTLSSupport

Connections that support StartTLS (Genesys: auto-detect/upgrade) functionality should implement this interface.


Method Summary
 boolean resumeReading()
          Resumes reading from channel.
 void startTLS()
          Starts TLS on the connection that has been already opened.
 void startTLS(java.lang.Runnable notificationCllback)
          Starts TLS on the connection that has been already opened.
 boolean stopReading()
          Stops reading from channel.
 void stopTLS()
          Stops TLS and returns to unencrypted state.
 

Method Detail

startTLS

void startTLS()
              throws java.security.GeneralSecurityException
Starts TLS on the connection that has been already opened.

Throws:
java.security.GeneralSecurityException - if problems with TLS configuration occurs

startTLS

void startTLS(java.lang.Runnable notificationCllback)
              throws java.security.GeneralSecurityException
Starts TLS on the connection that has been already opened.

Parameters:
notificationCllback - task to be called when TLS handshake finished.
Throws:
java.security.GeneralSecurityException - if problems with TLS configuration occurs

stopTLS

void stopTLS()
Stops TLS and returns to unencrypted state. Optional.


stopReading

boolean stopReading()
Stops reading from channel. Can be used before TLS engine initialization to prevent receiving TLS handshake until TLS engine is started on server side. This operation is not guaranteed to execute instantly and may impose some delay and require synchronization with selector thread. Typical StartTLS sequence on server side: 1. (Received StartTLS request from client) 2. Stop reading from channel 3. Send StartTLS response to client 4. Initialize TLS engine and add it to channel 5. Resume reading from channel

Returns:
true if reading stopped successfully, false if error happened or timeout exceeded

resumeReading

boolean resumeReading()
Resumes reading from channel. This operation is not guaranteed to execute instantly and may impose some delay and require synchronization with selector thread.

Returns:
true if reading resumed successfully, false if error happened or timeout exceeded

Platform SDK Java 8.5 API Reference

Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 8.5.302.00
Copyright © 2006–2017 Genesys Telecommunications Laboratories, Inc. All rights reserved.