             [catacumba.stream :as stream]
             [catacumba.impl.helpers :as hp]
             [catacumba.impl.context :as ctx]
+            [catacumba.impl.registry :as reg]
             [catacumba.impl.http :as http])
   (:import catacumba.impl.DelegatedContext
            catacumba.impl.ContextHolder

    (let [^Context ctx (:catacumba/context context)]
      (if (.isEmpty this)
        (.next ctx)
        (if-let [^DelegatedContext dc (hp/maybe-get ctx DelegatedContext)]
          (.next ctx (Registry/single
                      (DelegatedContext. (merge (.-data dc)
                                                (.-data this)))))
          (.next ctx (Registry/single this))))))

  java.nio.file.Path
  (-handle-response [path context]

           io.netty.buffer.Unpooled
           io.netty.buffer.ByteBuf))

;; --- Base Handling Protocols

(defprotocol ISend
  (-send [data ctx] "Send data."))
