@Override public void configure(StaplerRequest req, JSONObject formData) throws IOException, ServletException, FormException { try { endpoints.rebuildHetero(req, formData, NotificationEndpoint.all(), "endpoints"); save(); } catch (IOException e) { throw new FormException(e, "endpoints"); } }
private void _notify(final Event event) { for (final NotificationEndpoint endpoint : endpoints) { if (endpoint.getEvents().isEmpty()) { start( new Runnable() { public void run() { endpoint.notify(event); } }); } else if (endpoint.getEvents().containsKey(event.getName())) { final EndpointEvent endpointEvent = endpoint.getEvents().get(event.getName()); start( new Runnable() { public void run() { endpoint.notify(event, endpointEvent); } }); } } }