Java Client for Jenkins SSE Gateway Plugin.
Client client = new Client("http://your-jenkins-server", "user", "api-token or password");
client.connect("clientId");
client.subscribe("job", event -> {
Map data = event.readData(Map.class);
System.out.println(data);
...
});
See also Events and EventProps.
client.subscribe("pipeline", event -> {
Map data = event.readData(Map.class);
System.out.println(data);
...
});
See also PipelineEventChannel.