code: private boolean hasActiveSessions() {
          final SSLContext sslContext = getSSLContext(sslContextServiceController);
          if (sslContext == null) return false;
          SSLSessionContext sslSessionContext = server ? sslContext.getServerSessionContext() : sslContext.getClientSessionContext();
          return sslSessionContext.getIds().hasMoreElements();
      }
docs: Check if the {@link SSLContext} has any active sessions.
  
  @return {@code true} if the {@link SSLContext} is available and has at least one session, {@code false} otherwise.