aboutsummaryrefslogtreecommitdiff
path: root/src/clojure/contrib/jmx/Bean.clj
diff options
context:
space:
mode:
authorStuart Sierra <mail@stuartsierra.com>2010-01-20 15:39:56 -0500
committerStuart Sierra <mail@stuartsierra.com>2010-01-20 15:39:56 -0500
commit2ede388a9267d175bfaa7781ee9d57532eb4f20f (patch)
treebb42002af196405d7e25cc4e30b4c1c9de5c06d5 /src/clojure/contrib/jmx/Bean.clj
parent1bc820d96048a6536706ff999e9892649b53c700 (diff)
Move source files into Maven-style directory structure.
Diffstat (limited to 'src/clojure/contrib/jmx/Bean.clj')
-rw-r--r--src/clojure/contrib/jmx/Bean.clj35
1 files changed, 0 insertions, 35 deletions
diff --git a/src/clojure/contrib/jmx/Bean.clj b/src/clojure/contrib/jmx/Bean.clj
deleted file mode 100644
index cae67d21..00000000
--- a/src/clojure/contrib/jmx/Bean.clj
+++ /dev/null
@@ -1,35 +0,0 @@
-(ns clojure.contrib.jmx.Bean
- (:gen-class
- :implements [javax.management.DynamicMBean]
- :init init
- :state state
- :constructors {[Object] []})
- (:require [clojure.contrib.jmx :as jmx])
- (:import [javax.management DynamicMBean MBeanInfo AttributeList]))
-
-(defn -init [derefable]
- [[] derefable])
-
-; TODO: rest of the arguments, as needed
-(defn generate-mbean-info [clj-bean]
- (MBeanInfo. (.. clj-bean getClass getName) ; class name
- "Clojure Dynamic MBean" ; description
- (jmx/map->attribute-infos @(.state clj-bean)) ; attributes
- nil ; constructors
- nil ; operations
- nil)) ; notifications
-
-(defn -getMBeanInfo
- [this]
- (generate-mbean-info this))
-
-(defn -getAttribute
- [this attr]
- (@(.state this) (keyword attr)))
-
-(defn -getAttributes
- [this attrs]
- (let [result (AttributeList.)]
- (doseq [attr attrs]
- (.add result (.getAttribute this attr)))
- result)) \ No newline at end of file