code: public boolean isSslStarted(IoSession session) {
          SslHandler handler = (SslHandler) session.getAttribute(SSL_HANDLER);
          
          if (handler == null) {
              return false;
          }
  
          synchronized (handler) {
              return !handler.isOutboundDone();
          }
      }
docs: Returns <tt>true</tt> if and only if the specified <tt>session</tt> is
  encrypted/decrypted over SSL/TLS currently.  This method will start
  to retun <tt>false</tt> after TLS <tt>close_notify</tt> message
  is sent and any messages written after then is not goinf to get encrypted.