Skip to content

Instantly share code, notes, and snippets.

@vilmibm
Created February 8, 2016 23:40
Show Gist options
  • Save vilmibm/910b06d33fe907a997a2 to your computer and use it in GitHub Desktop.
Save vilmibm/910b06d33fe907a997a2 to your computer and use it in GitHub Desktop.
package com.puppetlabs.puppetserver;
import java.util.Map;
/**
*
* This interface is a bridge between the clojure/Java code and the ruby class
* `JRubyPuppet`. (defined in `src/ruby/puppet-server-lib/jruby_puppet.rb`.)
* The ruby class uses some JRuby magic that causes it to "implement" the Java
* interface.
*
* So, from the outside (in the clojure/Java code), we can interact with an instance
* of the ruby class simply as if it were an instance of this interface; thus, consuming
* code need not be aware of any of the JRuby implementation details.
*
*/
public interface JRubyPuppet {
Map getClassInfoForEnvironment(String environment);
JRubyPuppetResponse handleRequest(Map request);
Object getSetting(String setting);
String puppetVersion();
void terminate();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment