diff options
author | Tom Faulhaber <git_net@infolace.com> | 2009-08-15 18:00:01 -0700 |
---|---|---|
committer | Tom Faulhaber <git_net@infolace.com> | 2009-08-15 18:00:01 -0700 |
commit | c6648c454f7e6e83bfabdfc2180b534cdbbeb7be (patch) | |
tree | c2993071cc0dd0170407decf8d1f35dc44b775e5 | |
parent | eedcd380e189acf27436f7596caca3931b972178 (diff) |
Manual (forced) documentation build for commit c2f2b43fa22e3759a1844a1715fb8a32b18e9f6f
-rw-r--r-- | api-index.json | 5 | ||||
-rw-r--r-- | index.html | 64 | ||||
-rw-r--r-- | jmx-api.html | 64 |
3 files changed, 127 insertions, 6 deletions
diff --git a/api-index.json b/api-index.json index 4b6a5792..6dde948b 100644 --- a/api-index.json +++ b/api-index.json @@ -246,8 +246,9 @@ "wiki-url": "http://richhickey.github.com/clojure-contrib/jmx-api.html", "name":"clojure.contrib.jmx", - "author":null, - "doc":null}, + "author":"Stuart Halloway", + "doc": + "JMX support for Clojure\n\nRequires post-Clojure 1.0 git edge for clojure.test, clojure.backtrace.\nThis is prerelease.\nThis API will change.\nSend reports to stu@thinkrelevance.com.\n\nUsage\n (require '[clojure.contrib.jmx :as jmx])\n\nWhat beans do I have?\n\n (jmx/mbean-names \"*:*\")\n -> #<HashSet [java.lang:type=MemoryPool,name=CMS Old Gen, \n java.lang:type=Memory, ...]\n\nWhat attributes does a bean have?\n\n (jmx/attribute-names \"java.lang:type=Memory\")\n -> (:Verbose :ObjectPendingFinalizationCount \n :HeapMemoryUsage :NonHeapMemoryUsage)\n\nWhat is the value of an attribute? \n\n (jmx/read \"java.lang:type=Memory\" :ObjectPendingFinalizationCount)\n -> 0\n\nCan't I just have *all* the attributes in a Clojure map?\n\n (jmx/mbean \"java.lang:type=Memory\")\n -> {:NonHeapMemoryUsage\n {:used 16674024, :max 138412032, :init 24317952, :committed 24317952},\n :HeapMemoryUsage\n {:used 18619064, :max 85393408, :init 0, :committed 83230720},\n :ObjectPendingFinalizationCount 0,\n :Verbose false}\n\nCan I find and invoke an operation?\n\n (jmx/operation-names \"java.lang:type=Memory\")\n -> (:gc) \n (jmx/invoke \"java.lang:type=Memory\" :gc)\n -> nil\n\nWhat about some other process? Just run *any* of the above code\ninside a with-connection:\n\n (jmx/with-connection {:host \"localhost\", :port 3000} \n (jmx/mbean \"java.lang:type=Memory\"))\n -> {:ObjectPendingFinalizationCount 0, \n :HeapMemoryUsage ... etc.}\n\nCan I serve my own beans? Sure, just drop a Clojure ref\ninto an instance of clojure.contrib.jmx.Bean, and the bean\nwill expose read-only attributes for every key/value pair\nin the ref:\n\n (jmx/register-mbean\n (Bean.\n (ref {:string-attribute \"a-string\"}))\n \"my.namespace:name=Value\")"}, {"source-url": "http://github.com/richhickey/clojure-contrib/blob/4f2c7bb5cf6828eb710fd18b603828ab295d0fa5/src/clojure/contrib/json/read.clj", "wiki-url": @@ -956,9 +956,69 @@ defined for any type.</pre> <br /> <hr /> <h2 id="jmx">jmx</h2> - by <span id="author">unknown author</span><br /> + by <span id="author">Stuart Halloway</span><br /> API documentation <a href="jmx-api.html" id="api-link">here</a><br /> - <pre id="namespace-docstr"></pre> + <pre id="namespace-docstr">JMX support for Clojure + +Requires post-Clojure 1.0 git edge for clojure.test, clojure.backtrace. +This is prerelease. +This API will change. +Send reports to stu@thinkrelevance.com. + +Usage + (require '[clojure.contrib.jmx :as jmx]) + +What beans do I have? + + (jmx/mbean-names "*:*") + -> #<HashSet [java.lang:type=MemoryPool,name=CMS Old Gen, + java.lang:type=Memory, ...] + +What attributes does a bean have? + + (jmx/attribute-names "java.lang:type=Memory") + -> (:Verbose :ObjectPendingFinalizationCount + :HeapMemoryUsage :NonHeapMemoryUsage) + +What is the value of an attribute? + + (jmx/read "java.lang:type=Memory" :ObjectPendingFinalizationCount) + -> 0 + +Can't I just have *all* the attributes in a Clojure map? + + (jmx/mbean "java.lang:type=Memory") + -> {:NonHeapMemoryUsage + {:used 16674024, :max 138412032, :init 24317952, :committed 24317952}, + :HeapMemoryUsage + {:used 18619064, :max 85393408, :init 0, :committed 83230720}, + :ObjectPendingFinalizationCount 0, + :Verbose false} + +Can I find and invoke an operation? + + (jmx/operation-names "java.lang:type=Memory") + -> (:gc) + (jmx/invoke "java.lang:type=Memory" :gc) + -> nil + +What about some other process? Just run *any* of the above code +inside a with-connection: + + (jmx/with-connection {:host "localhost", :port 3000} + (jmx/mbean "java.lang:type=Memory")) + -> {:ObjectPendingFinalizationCount 0, + :HeapMemoryUsage ... etc.} + +Can I serve my own beans? Sure, just drop a Clojure ref +into an instance of clojure.contrib.jmx.Bean, and the bean +will expose read-only attributes for every key/value pair +in the ref: + + (jmx/register-mbean + (Bean. + (ref {:string-attribute "a-string"})) + "my.namespace:name=Value")</pre> Public variables and functions: <span id="var-link"><a href="jmx-api.html#jmx/*connection*" id="var-tag">*connection*</a> </span><span id="var-link"><a href="jmx-api.html#jmx/as-object-name" id="var-tag">as-object-name</a> </span><span id="var-link"><a href="jmx-api.html#jmx/attribute-info" id="var-tag">attribute-info</a> </span><span id="var-link"><a href="jmx-api.html#jmx/attribute-names" id="var-tag">attribute-names</a> </span><span id="var-link"><a href="jmx-api.html#jmx/build-attribute-info" id="var-tag">build-attribute-info</a> </span><span id="var-link"><a href="jmx-api.html#jmx/guess-attribute-typename" id="var-tag">guess-attribute-typename</a> </span><span id="var-link"><a href="jmx-api.html#jmx/jmx->clj" id="var-tag">jmx->clj</a> </span><span id="var-link"><a href="jmx-api.html#jmx/jmx-url" id="var-tag">jmx-url</a> </span><span id="var-link"><a href="jmx-api.html#jmx/map->attribute-infos" id="var-tag">map->attribute-infos</a> </span><span id="var-link"><a href="jmx-api.html#jmx/maybe-atomize" id="var-tag">maybe-atomize</a> </span><span id="var-link"><a href="jmx-api.html#jmx/maybe-keywordize" id="var-tag">maybe-keywordize</a> </span><span id="var-link"><a href="jmx-api.html#jmx/mbean" id="var-tag">mbean</a> </span><span id="var-link"><a href="jmx-api.html#jmx/mbean-names" id="var-tag">mbean-names</a> </span><span id="var-link"><a href="jmx-api.html#jmx/op-param-types" id="var-tag">op-param-types</a> </span><span id="var-link"><a href="jmx-api.html#jmx/operation" id="var-tag">operation</a> </span><span id="var-link"><a href="jmx-api.html#jmx/operation-names" id="var-tag">operation-names</a> </span><span id="var-link"><a href="jmx-api.html#jmx/operations" id="var-tag">operations</a> </span><span id="var-link"><a href="jmx-api.html#jmx/raw-read" id="var-tag">raw-read</a> </span><span id="var-link"><a href="jmx-api.html#jmx/read" id="var-tag">read</a> </span><span id="var-link"><a href="jmx-api.html#jmx/read-exceptions" id="var-tag">read-exceptions</a> </span><span id="var-link"><a href="jmx-api.html#jmx/read-supported" id="var-tag">read-supported</a> </span><span id="var-link"><a href="jmx-api.html#jmx/readable?" id="var-tag">readable?</a> </span><span id="var-link"><a href="jmx-api.html#jmx/with-connection" id="var-tag">with-connection</a> </span><br /> diff --git a/jmx-api.html b/jmx-api.html index 0a10ec7f..54bcc150 100644 --- a/jmx-api.html +++ b/jmx-api.html @@ -106,14 +106,74 @@ namespace. </div> </div></div> <div id="content-tag"><div><h1 id="overview">API for <span id="namespace-name">jmx</span></h1> -by <span id="author">Unknown</span><br /> +by <span id="author">Stuart Halloway</span><br /> <br />Usage: <pre> (ns your-namespace (:require <span id="long-name">clojure.contrib.jmx</span>)) </pre><pre> </pre><h2>Overview</h2> -<pre id="namespace-docstr"></pre> +<pre id="namespace-docstr">JMX support for Clojure + +Requires post-Clojure 1.0 git edge for clojure.test, clojure.backtrace. +This is prerelease. +This API will change. +Send reports to stu@thinkrelevance.com. + +Usage + (require '[clojure.contrib.jmx :as jmx]) + +What beans do I have? + + (jmx/mbean-names "*:*") + -> #<HashSet [java.lang:type=MemoryPool,name=CMS Old Gen, + java.lang:type=Memory, ...] + +What attributes does a bean have? + + (jmx/attribute-names "java.lang:type=Memory") + -> (:Verbose :ObjectPendingFinalizationCount + :HeapMemoryUsage :NonHeapMemoryUsage) + +What is the value of an attribute? + + (jmx/read "java.lang:type=Memory" :ObjectPendingFinalizationCount) + -> 0 + +Can't I just have *all* the attributes in a Clojure map? + + (jmx/mbean "java.lang:type=Memory") + -> {:NonHeapMemoryUsage + {:used 16674024, :max 138412032, :init 24317952, :committed 24317952}, + :HeapMemoryUsage + {:used 18619064, :max 85393408, :init 0, :committed 83230720}, + :ObjectPendingFinalizationCount 0, + :Verbose false} + +Can I find and invoke an operation? + + (jmx/operation-names "java.lang:type=Memory") + -> (:gc) + (jmx/invoke "java.lang:type=Memory" :gc) + -> nil + +What about some other process? Just run *any* of the above code +inside a with-connection: + + (jmx/with-connection {:host "localhost", :port 3000} + (jmx/mbean "java.lang:type=Memory")) + -> {:ObjectPendingFinalizationCount 0, + :HeapMemoryUsage ... etc.} + +Can I serve my own beans? Sure, just drop a Clojure ref +into an instance of clojure.contrib.jmx.Bean, and the bean +will expose read-only attributes for every key/value pair +in the ref: + + (jmx/register-mbean + (Bean. + (ref {:string-attribute "a-string"})) + "my.namespace:name=Value")</pre> <br /> <h2>Public Variables and Functions</h2> <div id="var-entry"> |