code: public static void shutDownSSLEngine(SSLConnectionLink connLink, boolean isServer, boolean isConnected) {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
              Tr.entry(tc, "shutDownSSLEngine: isServer: " + isServer
                           + " isConnected: " + isConnected + " " + connLink);
          }
          SSLEngine engine = connLink.getSSLEngine();
  
          if (engine != null) {
  
              if (isServer) {
                  if (!engine.isInboundDone()) {
                      if (isConnected) {
                          engine.closeOutbound();
                          WsByteBuffer buffer = allocateByteBuffer(
                                                                   engine.getSession().getPacketBufferSize(), false);
                          flushCloseDown(engine, buffer, connLink);
                          buffer.release();
                      }
                      try {
                          engine.closeInbound();
                      } catch (SSLException se) {
                          // no FFDC required, should indicate that we're closing before
                          // the remote end started the close process
                      }
                  }
              } else {
                  // client side closing
                  if (!engine.isOutboundDone()) {
                      engine.closeOutbound();
                  }
                  if (isConnected) {
                      WsByteBuffer buffer = allocateByteBuffer(
                                                               engine.getSession().getPacketBufferSize(), false);
                      flushCloseDown(engine, buffer, connLink);
                      buffer.release();
                      // Note: ideally we would do a read/unwrap at this point to pull the
                      // server side CLOSE message off the network but that shouldn't be
                      // necessary
                  }
              }
          } else {
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                  Tr.debug(tc, "SSLEngine is null, must be shutdown already.");
          }
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
              Tr.exit(tc, "shutDownSSLEngine");
          }
      }
docs: Shut down the engine for the given SSL connection link.
  
  @param connLink
  @param isServer
  @param isConnected