Closed darkleaf closed 1 year ago
It is useful for stopping a server without reflection warnings.
(ns some-ns ... (:import [org.eclipse.jetty.server Server])) (defmethod ig/halt-key! ::adapters/jetty [_ ^Server server] (.stop server))
vs
(defmethod ig/halt-key! ::adapters/jetty [_ server] (jetty/stop server))
or even for lazy loading:
(defmethod ig/halt-key! ::adapters/jetty [_ server] ((requiring-resolve 'ring.adapter.jetty/stop) server))
As there isn't a mechanism in the adapter spec for this, I don't think I'll add this to Ring at this time.
It is useful for stopping a server without reflection warnings.
vs
or even for lazy loading: