daily pastebin goal
28%
SHARE
TWEET

Untitled

a guest Oct 19th, 2018 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package rhq.clj.test;
  2.  
  3. import clojure.lang.RT;
  4. import clojure.lang.Var;
  5. import org.rhq.core.domain.measurement.AvailabilityType;
  6. import org.rhq.core.pluginapi.inventory.*;
  7.  
  8. import java.util.HashSet;
  9. import java.util.Set;
  10.  
  11. public class ClojurePluginComponent
  12.     implements ResourceDiscoveryComponent, ResourceComponent {
  13.  
  14.     public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext context)
  15.         throws Exception {
  16.         RT.loadResourceScript("rhq/clj/test.clj");
  17.         Var discover = RT.var("rhq.clj.test", "discover");
  18.         discover.invoke();
  19.         return new HashSet<DiscoveredResourceDetails>();
  20.     }
  21.  
  22.     public void start(ResourceContext context) throws Exception {
  23.     }
  24.  
  25.     public void stop() {
  26.     }
  27.  
  28.     public AvailabilityType getAvailability() {
  29.         return null;
  30.     }
  31. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top