def handle_update(key)
      n, exchange, env, etag = @store[key]
      n += 1

      response, options = server.respond(exchange, env)

      return if response.nil?

      if response.mcode[0] != 2
        self.delete(exchange)
        transmit(exchange, response, options)
        return
      end

      if etag != response.options[:etag]
        response.tt = :con
        response.mid = SecureRandom.random_number(0xffff)
        response.options[:observe] = n

        transmit(exchange, response, options)

        # TODO Implement removing of observe relationship on RST answer to
        #      notification in main dispatcher
        # if !answer.nil? && answer.tt == :rst
        #   self.delete(exchange)
        #   return
        # end

        bump(key, n, response)
      end
    end
def handle_update(key)
      n, exchange, env, etag = @store[key]
      n += 1

      response, options = server.respond(exchange, env)

      return if response.nil?

      if response.mcode[0] != 2
        self.delete(exchange)
        transmit(exchange, response, options)
        return
      end

      if etag != response.options[:etag]
        response.tt = :con
        response.mid = SecureRandom.random_number(0xffff)
        response.options[:observe] = n

        transmit(exchange, response, options)

        # TODO Implement removing of observe relationship on RST answer to
        #      notification in main dispatcher
        # if !answer.nil? && answer.tt == :rst
        #   self.delete(exchange)
        #   return
        # end

        bump(key, n, response)
      end
    end
TODO If ETag did not change but max-age of last notification is expired,
      return empty 2.03.