Class ServerUtil
java.lang.Object
org.apache.activemq.artemis.util.ServerUtil
A tool to let clients start, stop and kill Artemis servers
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Processstatic intgetServer(javax.jms.Connection connection) static javax.jms.ConnectiongetServerConnection(int server, javax.jms.Connection... connections) static voidkillServer(Process server) static voidkillServer(Process server, boolean forcibly) static ProcessstartServer(String artemisInstance, String serverName) static ProcessstartServer(String artemisInstance, String serverName, int id, int timeout) Start the server.static ProcessstartServer(String artemisInstance, String serverName, int id, int timeout, File brokerProperties) static ProcessstartServer(String artemisInstance, String serverName, String uri, int timeout) static ProcessstartServer(String artemisInstance, String serverName, String uri, int timeout, File propertiesFile) static booleanwaitForServerToStart(int id, int timeout) static booleanwaitForServerToStart(int id, String username, String password, int timeout) static booleanwaitForServerToStart(String uri, long timeout) static booleanwaitForServerToStart(String uri, String username, String password, long timeout) static booleanwaitForServerToStartOnPort(int port, String username, String password, int timeout)
-
Constructor Details
-
ServerUtil
public ServerUtil()
-
-
Method Details
-
startServer
-
startServer
-
startServer
-
startServer
-
startServer
-
execute
public static Process execute(String artemisInstance, String jobName, String... args) throws IOException, ClassNotFoundException - Throws:
IOExceptionClassNotFoundException
-
waitForServerToStart
- Throws:
InterruptedException
-
waitForServerToStart
public static boolean waitForServerToStart(int id, String username, String password, int timeout) throws InterruptedException - Throws:
InterruptedException
-
waitForServerToStartOnPort
public static boolean waitForServerToStartOnPort(int port, String username, String password, int timeout) throws InterruptedException - Throws:
InterruptedException
-
waitForServerToStart
- Throws:
InterruptedException
-
waitForServerToStart
public static boolean waitForServerToStart(String uri, String username, String password, long timeout) throws InterruptedException - Throws:
InterruptedException
-
killServer
-
killServer
-
getServer
public static int getServer(javax.jms.Connection connection) -
getServerConnection
public static javax.jms.Connection getServerConnection(int server, javax.jms.Connection... connections)
-