code: public void messageReceived(NextFilter nextFilter, ByteBuffer buf) throws SSLException {
          // append buf to inNetBuffer
          if (inNetBuffer == null) {
              inNetBuffer = allocator.wrap(allocator.allocate(buf.remaining())).setAutoExpander(allocator);
          }
  
          inNetBuffer.put(buf);
          if (!handshakeComplete) {
              handshake(nextFilter);
          }
  
          // Application data will be in the same message as the handshake
          // during False Start
          if (handshakeComplete) {
              decrypt(nextFilter);
          }
  
          if (isInboundDone()) {
              // Rewind the MINA buffer if not all data is processed and inbound is finished.
              int inNetBufferPosition = inNetBuffer == null? 0 : inNetBuffer.position();
              buf.position(buf.position() - inNetBufferPosition);
              inNetBuffer = null;
          }
      }
docs: Call when data read from net. Will perform inial hanshake or decrypt provided
  Buffer.
  Decrytpted data reurned by getAppBuffer(), if any.
  
  @param buf        buffer to decrypt
  @param nextFilter Next filter in chain
  @throws SSLException on errors