Skip to content

Instantly share code, notes, and snippets.

@michaelklishin
Created July 24, 2011 02:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaelklishin/1724d20f73e650ff9937 to your computer and use it in GitHub Desktop.
Save michaelklishin/1724d20f73e650ff9937 to your computer and use it in GitHub Desktop.
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)
(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