From c259d990ad63b38140985ba6e25b5046dd767833 Mon Sep 17 00:00:00 2001 From: ulrich Date: Fri, 22 Nov 2024 08:16:48 +0000 Subject: [PATCH] Build-Anweisungen in Readme aktualisiert. --- src/de/uhilger/tango/Server.java | 15 +++++++++++---- 1 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/de/uhilger/tango/Server.java b/src/de/uhilger/tango/Server.java index d356c0f..1a56b0d 100644 --- a/src/de/uhilger/tango/Server.java +++ b/src/de/uhilger/tango/Server.java @@ -25,6 +25,7 @@ import de.uhilger.tango.api.MediaSteuerung; import de.uhilger.tango.api.StopServerHandler; import de.uhilger.tango.api.StorageHandler; +import de.uhilger.tango.api.StreamHandler; import de.uhilger.tango.store.FileStorage; import de.uhilger.tango.entity.Ablageort; import java.io.File; @@ -54,12 +55,14 @@ public static final String RB_STORE = "store"; public static final String RB_STRG = "strg"; public static final String RB_GSTRG = "gstrg"; - public static final String RB_ALIST= "alist"; + public static final String RB_ALIST = "alist"; + public static final String RB_STRM = "strm"; //public static final String RB_UI_ROOT = "uiroot"; public static final String RB_STOP_SERVER = "stopServer"; //public static final String RB_ABLAGE_TEST = "testAblage"; //public static final String RB_STORE_TEST = "testStore"; public static final String SLASH = "/"; + public static final String NEWLINE = "\n"; private int port; @@ -118,12 +121,16 @@ server.createContext(ctx + rb.getString(RB_WEBROOT), new FileHandler(wwwDir.getAbsolutePath())); ablageorteEinklinken(server, rb, conf); server.createContext(ctx + rb.getString(RB_STORE), new StorageHandler(conf)); - server.createContext(ctx + rb.getString(RB_STRG), new MediaSteuerung(conf)); + MediaSteuerung ms = new MediaSteuerung(conf); + server.createContext(ctx + rb.getString(RB_STRG), ms); server.createContext(ctx + rb.getString(RB_GSTRG), new GeraetSteuerung(conf)); - server.createContext(ctx + rb.getString(RB_ALIST), new ListHandler(conf)); + ListHandler lh = new ListHandler(conf); + lh.addPlaylistListener(ms); + server.createContext(ctx + rb.getString(RB_ALIST), lh); + server.createContext(ctx + rb.getString(RB_STRM), new StreamHandler(conf)); server.createContext(ctx + rb.getString(RB_STOP_SERVER), new StopServerHandler()); //server.setExecutor(Executors.newFixedThreadPool(20)); - server.setExecutor(Executors.newCachedThreadPool()); + server.setExecutor(Executors.newFixedThreadPool(5)); server.start(); } -- Gitblit v1.9.3