Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'more-ruby-less-java' of github.com:cowboyd/fog.hpi into…
… more-ruby-less-java
- Loading branch information
Showing
2 changed files
with
25 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package ruby; | ||
|
||
import org.jruby.javasupport.proxy.InternalJavaProxy; | ||
import org.kohsuke.stapler.HttpResponseRenderer; | ||
import org.kohsuke.stapler.StaplerRequest; | ||
import org.kohsuke.stapler.StaplerResponse; | ||
|
||
import javax.servlet.ServletException; | ||
import java.io.IOException; | ||
|
||
/** | ||
* Takes a return value from methods like "doDynamic" and convert it to HTML response. | ||
* | ||
* @author Kohsuke Kawaguchi | ||
*/ | ||
public class HttpResponseRendererImpl extends HttpResponseRenderer { | ||
@Override | ||
public boolean generateResponse(StaplerRequest req, StaplerResponse rsp, Object node, Object response) throws IOException, ServletException { | ||
if (InternalJavaProxy.class.isAssignableFrom(response.getClass())) { | ||
// TODO: render the response | ||
} | ||
} | ||
} |
This file contains 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