Skip to content

Instantly share code, notes, and snippets.

@jsanda
Created June 13, 2012 01:01
Show Gist options
  • Save jsanda/2921124 to your computer and use it in GitHub Desktop.
Save jsanda/2921124 to your computer and use it in GitHub Desktop.
(ns rhq.plugin
(:require [rhq.config :as config])
(:import [org.rhq.core.pluginapi.inventory
ResourceDiscoveryComponent ResourceDiscoveryContext ClassLoaderFacet
DiscoveredResourceDetails ResourceComponent ResourceContext]
[org.rhq.core.domain.measurement AvailabilityType])
(:gen-class
:name rhq.plugin.PluginComponent
:implements [org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent
org.rhq.core.pluginapi.inventory.ResourceComponent]))
(defn ^java.util.Set -discoverResources [this ^ResourceDiscveryContext context]
(.println System/out "DISCOVER"))
(defn ^AvailabilityType -getAvailability [this] nil)
(defn -start [this ^ResourceContext context]
(.println System/out "STARTING PLUGIN")
(print "STARTING PLUGIN"))
(defn -stop [this] nil)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment