-
-
Save michaelklishin/1724d20f73e650ff9937 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Exception in thread "main" java.lang.IllegalArgumentException: interface com.rabbitmq.client.Connection is not a protocol (core.clj:1) | |
at clojure.lang.Compiler.eval(Compiler.java:5440) | |
at clojure.lang.Compiler.load(Compiler.java:5857) | |
at clojure.lang.RT.loadResourceScript(RT.java:340) | |
at clojure.lang.RT.loadResourceScript(RT.java:331) | |
at clojure.lang.RT.load(RT.java:409) | |
at clojure.lang.RT.load(RT.java:381) | |
at clojure.core$load$fn__4519.invoke(core.clj:4915) | |
at clojure.core$load.doInvoke(core.clj:4914) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns leporidae.protocols | |
(:import (com.rabbitmq.client ConnectionFactory Connection))) | |
;; | |
;; Protocols | |
;; | |
(defprotocol Closeable | |
(close [c] "Closes given entity")) | |
(extend-type Closeable | |
com.rabbitmq.client.Connection | |
(close [this] (.close this))) | |
(extend-type Closeable | |
com.rabbitmq.client.Channel | |
(close [this] (.close this))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment