Package tlschannel

Class NeedsTaskException

All Implemented Interfaces:
Serializable

public class NeedsTaskException extends TlsChannelFlowControlException
This exception signals the caller that the operation could not continue because a CPU-intensive operation (typically a TLS handshaking) needs to be executed and the TlsChannel is configured to not run tasks. This allows the application to run these tasks in some other threads, in order to not slow the selection loop. The method that threw the exception should be retried once the task supplied by getTask() is executed and finished.

This exception is akin to the SSL_ERROR_WANT_ASYNC error code used by OpenSSL (but note that in OpenSSL, the task is executed by the library, while with the TlsChannel, the calling code is responsible for the execution).

See Also:
  • Constructor Details

    • NeedsTaskException

      public NeedsTaskException(Runnable task)
  • Method Details