public class ServerPublisher4JBoss extends Object
Name: ServerPublisher4JBoss
Description: JBoss/Wildfly als eine Art "embedded" Server verwenden: dynamische Port-Vergabe mit Port-Offset, starten, stoppen, Warten auf Ende, Fehlererkennung.
Comment: ...
Copyright: Copyright (c) 2021
Company: >StA-Soft<
| Modifier | Constructor and Description |
|---|---|
protected |
ServerPublisher4JBoss()
Dummy-Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static int |
getJBossHTTPPort()
HTTP-Port ermitteln.
|
static int |
getJBossHTTPSPort()
HTTPS-Port ermitteln.
|
static int |
getJBossPort()
JBoss/Wildfly-Port ermitteln.
|
static int |
getJBossPort(String scheme)
HTTP- oder HTTPS-Port ermitteln.
|
static void |
log2log4j(String msg)
Log-Ausgabe des JBoss/Wildfly-Prozesses.
|
static void |
main(String... args)
Main-Methode, um die Funktionalität auszuprobieren.
|
static void |
startServer(int httpport,
int httpsport,
File[] srcconffiles,
File srcstandalonefullfile,
File srcearfile)
JBoss/Wildfly starten.
|
static void |
stopServer()
JBoss/Wildfly "hart" beenden ("abschieÃen").
|
static void |
wait4JBoss()
Auf das Ende vom JBoss/Wildfly-Prozess warten.
|
public static void log2log4j(String msg)
msg - auszugebender Textpublic static void startServer(int httpport,
int httpsport,
File[] srcconffiles,
File srcstandalonefullfile,
File srcearfile)
throws Exception
httpport - HTTP-Porthttpsport - HTTPS-Portsrcconffiles - Liste von Dateien oder Verzeichnissen, aus denen Konfigurationsdateien kopiert werden sollen
(kann null sein, dann wird das configuration-Verzeichnis der 1. Instanz [Instanz Nr. 0] verwendet, es würden dann die
Standard-Konfigurationsdateien kopiert)srcstandalonefullfile - zu verwendendes standalone-full.xml-File (kann null sein, dann Standard-Vorgabe)srcearfile - zu deployendes EAR-File oder Verzeichnis mit mind. einem EAR-File
(im Verzeichnisfall: es wird das erste EAR-File genommen)Exception - im Fehlerfallpublic static int getJBossPort()
public static int getJBossPort(String scheme)
scheme - "http" oder "https"public static int getJBossHTTPPort()
public static int getJBossHTTPSPort()
public static void wait4JBoss()
throws InterruptedException
InterruptedException - im Fehlerfallpublic static void stopServer()
throws Exception
Exception - im Fehlerfallpublic static void main(String... args)
args - Kommandozeilenargumente (HTTP-Port, HTTPS-Port, -nowait)Copyright © 2021, 2023–2024 >StA-Soft<. All rights reserved.