code: public SSLEngine buildServerSSLEngine(SSLContext sslContext) {
          SSLEngine engine = sslContext.createSSLEngine();
          engine.setUseClientMode(false);
          if (needClientAuth) {
              engine.setNeedClientAuth(true);
          } else if (wantClientAuth) {
              engine.setWantClientAuth(true);
          }
          return addCommonConfigs(engine);
      }
docs: Build the server ssl engine using the ssl context.
  
  @param sslContext sslContext.
  @return SSLEngine.