Class SimpleManagement
- java.lang.Object
-
- org.apache.activemq.artemis.api.core.management.SimpleManagement
-
- All Implemented Interfaces:
AutoCloseable
public class SimpleManagement extends Object implements AutoCloseable
This class provides a simple proxy for management operations
-
-
Constructor Summary
Constructors Constructor Description SimpleManagement(String uri, String user, String password)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()protected voiddoManagement(ManagementHelper.MessageAcceptor setup, ManagementHelper.MessageAcceptor ok, ManagementHelper.MessageAcceptor failed)protected static voidfailed(ClientMessage message)longgetCurrentTimeMillis()longgetMessageCountOnQueue(String queueName)longgetMessagesAddedOnQueue(String queueName)StringgetNodeID()Map<String,Long>getQueueCounts(int maxRows)org.apache.activemq.artemis.json.JsonArraylistNetworkTopology()SimpleManagementopen()protected static voidsetLongResult(ClientMessage m, AtomicLong result)protected static voidsetStringResult(ClientMessage m, AtomicReference<String> result)protected static voidsetupCall(ClientMessage m, String resource, String methodName, Object... parameters)StringsimpleManagement(String resource, String method, Object... parameters)Simple helper for management returning a string.longsimpleManagementLong(String resource, String method, Object... parameters)Simple helper for management returning a long.
-
-
-
Method Detail
-
open
public SimpleManagement open() throws Exception
- Throws:
Exception
-
close
public void close() throws Exception- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
simpleManagement
public String simpleManagement(String resource, String method, Object... parameters) throws Exception
Simple helper for management returning a string.- Throws:
Exception
-
simpleManagementLong
public long simpleManagementLong(String resource, String method, Object... parameters) throws Exception
Simple helper for management returning a long.- Throws:
Exception
-
getMessageCountOnQueue
public long getMessageCountOnQueue(String queueName) throws Exception
- Throws:
Exception
-
getMessagesAddedOnQueue
public long getMessagesAddedOnQueue(String queueName) throws Exception
- Throws:
Exception
-
getQueueCounts
public Map<String,Long> getQueueCounts(int maxRows) throws Exception
- Throws:
Exception
-
listNetworkTopology
public org.apache.activemq.artemis.json.JsonArray listNetworkTopology() throws Exception- Throws:
Exception
-
failed
protected static void failed(ClientMessage message) throws Exception
- Throws:
Exception
-
setupCall
protected static void setupCall(ClientMessage m, String resource, String methodName, Object... parameters) throws Exception
- Throws:
Exception
-
setStringResult
protected static void setStringResult(ClientMessage m, AtomicReference<String> result) throws Exception
- Throws:
Exception
-
setLongResult
protected static void setLongResult(ClientMessage m, AtomicLong result) throws Exception
- Throws:
Exception
-
doManagement
protected void doManagement(ManagementHelper.MessageAcceptor setup, ManagementHelper.MessageAcceptor ok, ManagementHelper.MessageAcceptor failed) throws Exception
- Throws:
Exception
-
-