Created
March 23, 2012 22:24
-
-
Save kohsuke/2175674 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
| import org.jruby.ext.posix.*; | |
| import hudson.os.*; | |
| class MyHandler implements POSIXHandler { | |
| public void error(POSIX.ERRORS errors, String s) { | |
| throw new PosixException(s,errors); | |
| } | |
| public void unimplementedError(String s) { | |
| throw new UnsupportedOperationException(s); | |
| } | |
| public void warn(POSIXHandler.WARNING_ID warning_id, String s, Object... objects) { | |
| LOGGER.fine(s); | |
| } | |
| public boolean isVerbose() { | |
| return true; | |
| } | |
| public File getCurrentWorkingDirectory() { | |
| // TODO | |
| throw new UnsupportedOperationException(); | |
| } | |
| public String[] getEnv() { | |
| // TODO | |
| throw new UnsupportedOperationException(); | |
| } | |
| public InputStream getInputStream() { | |
| // TODO | |
| throw new UnsupportedOperationException(); | |
| } | |
| public PrintStream getOutputStream() { | |
| // TODO | |
| throw new UnsupportedOperationException(); | |
| } | |
| public int getPID() { | |
| // TODO | |
| throw new UnsupportedOperationException(); | |
| } | |
| public PrintStream getErrorStream() { | |
| // TODO | |
| throw new UnsupportedOperationException(); | |
| } | |
| } | |
| POSIXFactory.getPOSIX(new MyHandler(), true) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment