Created
June 13, 2012 02:18
-
-
Save jsanda/2921415 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
package rhq.clj.test; | |
import clojure.lang.RT; | |
import clojure.lang.Var; | |
import org.rhq.core.domain.measurement.AvailabilityType; | |
import org.rhq.core.pluginapi.inventory.*; | |
import java.util.HashSet; | |
import java.util.Set; | |
public class ClojurePluginComponent | |
implements ResourceDiscoveryComponent, ResourceComponent { | |
public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext context) | |
throws Exception { | |
RT.loadResourceScript("rhq/clj/test.clj"); | |
Var discover = RT.var("rhq.clj.test", "discover"); | |
discover.invoke(); | |
return new HashSet<DiscoveredResourceDetails>(); | |
} | |
public void start(ResourceContext context) throws Exception { | |
} | |
public void stop() { | |
} | |
public AvailabilityType getAvailability() { | |
return null; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment