Last active
January 3, 2016 10:49
-
-
Save rinrinne/8451616 to your computer and use it in GitHub Desktop.
proposed implementation
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
package org.jenkinsci.plugins.study; | |
import com.sonyericsson.hudson.plugins.gerrit.trigger.api.GerritTrigger; | |
import com.sonyericsson.hudson.plugins.gerrit.trigger.api.exception.NoInstanceException; | |
import com.sonyericsson.hudson.plugins.gerrit.gerritevents.Handler; | |
class MyPlugin extends Plugin { | |
private GerritTriggerApi api = new GerritTriggerApi(); | |
public void postEvent(String eventString) { | |
try { | |
Handler handler = api.getHander(); | |
handler.post(eventString); | |
} catch (GerritTriggerException ex) { | |
String msg = ex.getMessage(); // dummy | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment