use of org.jenkinsci.plugins.pubsub.EventFilter in project blueocean-plugin by jenkinsci.
the class SSEConnection method subscribe.
public void subscribe(String channel) throws IOException {
// constructor is not public
// EventFilter f = new EventFilter();
JSONObject o = new JSONObject();
o.put("jenkins_channel", channel);
EventFilter f = (EventFilter) o.toBean(EventFilter.class);
configure(Collections.singletonList(f), Collections.<EventFilter>emptyList());
}
use of org.jenkinsci.plugins.pubsub.EventFilter in project blueocean-plugin by jenkinsci.
the class SSEConnection method toJSONArray.
private JSONArray toJSONArray(Collection<EventFilter> filters) {
JSONArray a = new JSONArray();
for (EventFilter f : filters) {
JSONObject o = new JSONObject();
o.putAll(f);
a.add(o);
}
return a;
}
Aggregations