overhauling constants, working on translations

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2026-01-15 13:58:50 +01:00
parent 669853352e
commit 0d1cdd35d1
103 changed files with 2161 additions and 1207 deletions

View File

@@ -1,8 +1,9 @@
/* © SRSoftware 2025 */
package de.srsoftware.umbrella.messagebus;
import static de.srsoftware.umbrella.core.Constants.*;
import static de.srsoftware.umbrella.core.ModuleRegistry.userService;
import static de.srsoftware.umbrella.core.constants.Constants.*;
import static de.srsoftware.umbrella.core.constants.Field.*;
import static java.lang.System.Logger.Level.*;
import static java.lang.Thread.sleep;
import static java.net.HttpURLConnection.HTTP_OK;
@@ -35,8 +36,8 @@ public class MessageApi extends BaseHandler{
var addr = ex.getRemoteAddress();
headers.add(CONTENT_TYPE, MimeType.MIME_EVENT_STREAM);
headers.add(CACHE_CONTROL,NO_CACHE);
headers.add(CONNECTION,KEEP_ALIVE);
headers.add(CACHE_CONTROL, NO_CACHE);
headers.add(CONNECTION, KEEP_ALIVE);
headers.add(CONTENT_ENCODING,NONE);
ex.sendResponseHeaders(HTTP_OK,0);
try (var os = ex.getResponseBody(); var stream = new PrintWriter(os); var eventQueue = new EventQueue(addr)){
@@ -58,7 +59,7 @@ public class MessageApi extends BaseHandler{
LOG.log(INFO,"{0} disconnected from event stream.",addr);
return true;
} catch (InterruptedException e) {
throw new UmbrellaException("EventStream broken").causedBy(e);
throw UmbrellaException.serverError("EventStream broken").causedBy(e);
} catch (Exception e) {
throw new RuntimeException(e);
}