Class JMSManagementHelper
java.lang.Object
org.apache.activemq.artemis.api.jms.management.JMSManagementHelper
Helper class to use JMS messages to manage ActiveMQ Artemis server resources.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectReturns the result of an operation invocation or an attribute value; if an error occurred on the serverhasOperationSucceeded(Message)will returnfalseand the result will be aStringcorresponding to the server exception.static ObjectReturns the result of an operation invocation or an attribute value; if an error occurred on the serverhasOperationSucceeded(Message)will returnfalseand the result will be aStringcorresponding to the server exception.static Object[]getResults(Message message) Returns the result of an operation invocation or an attribute value; if an error occurred on the serverhasOperationSucceeded(Message)will returnfalseand the result will be aStringcorresponding to the server exception.static booleanhasOperationSucceeded(Message message) Returns whether the invocation of the management operation on the server resource succeeded..static booleanisAttributesResult(Message message) Returns whether the JMS message corresponds to the result of a management attribute value..static booleanisOperationResult(Message message) Returns whether the JMS message corresponds to the result of a management operation invocation..static voidputAttribute(Message message, String resourceName, String attribute) Stores a resource attribute in a JMS message to retrieve the value from the server resource.static voidputOperationInvocation(Message message, String resourceName, String operationName) Stores an operation invocation in a JMS message to invoke the corresponding operation the value from the server resource.static voidputOperationInvocation(Message message, String resourceName, String operationName, Object... parameters) Stores an operation invocation in a JMS message to invoke the corresponding operation the value from the server resource.
-
Method Details
-
putAttribute
public static void putAttribute(Message message, String resourceName, String attribute) throws JMSException Stores a resource attribute in a JMS message to retrieve the value from the server resource.- Parameters:
message- JMS messageresourceName- the name of the resourceattribute- the name of the attribute- Throws:
JMSException- if an exception occurs while putting the information in the message- See Also:
-
putOperationInvocation
public static void putOperationInvocation(Message message, String resourceName, String operationName) throws JMSException Stores an operation invocation in a JMS message to invoke the corresponding operation the value from the server resource.- Parameters:
message- JMS messageresourceName- the name of the resourceoperationName- the name of the operation to invoke on the resource- Throws:
JMSException- if an exception occurs while putting the information in the message- See Also:
-
putOperationInvocation
public static void putOperationInvocation(Message message, String resourceName, String operationName, Object... parameters) throws JMSException Stores an operation invocation in a JMS message to invoke the corresponding operation the value from the server resource.- Parameters:
message- JMS messageresourceName- the name of the server resourceoperationName- the name of the operation to invoke on the server resourceparameters- the parameters to use to invoke the server resource- Throws:
JMSException- if an exception occurs while putting the information in the message- See Also:
-
isOperationResult
Returns whether the JMS message corresponds to the result of a management operation invocation..- Returns:
- whether the JMS message corresponds to the result of a management operation invocation.
- Throws:
JMSException
-
isAttributesResult
Returns whether the JMS message corresponds to the result of a management attribute value..- Returns:
- whether the JMS message corresponds to the result of a management attribute value.
- Throws:
JMSException
-
hasOperationSucceeded
Returns whether the invocation of the management operation on the server resource succeeded..- Returns:
- whether the invocation of the management operation on the server resource succeeded.
- Throws:
JMSException
-
getResults
Returns the result of an operation invocation or an attribute value; if an error occurred on the serverhasOperationSucceeded(Message)will returnfalseand the result will be aStringcorresponding to the server exception.- Returns:
- the result of an operation invocation or an attribute value; if an error occurred on the server
hasOperationSucceeded(Message)will returnfalseand the result will be aStringcorresponding to the server exception - Throws:
Exception
-
getResult
Returns the result of an operation invocation or an attribute value; if an error occurred on the serverhasOperationSucceeded(Message)will returnfalseand the result will be aStringcorresponding to the server exception.- Returns:
- the result of an operation invocation or an attribute value; if an error occurred on the server
hasOperationSucceeded(Message)will returnfalseand the result will be aStringcorresponding to the server exception - Throws:
Exception
-
getResult
Returns the result of an operation invocation or an attribute value; if an error occurred on the serverhasOperationSucceeded(Message)will returnfalseand the result will be aStringcorresponding to the server exception.- Returns:
- the result of an operation invocation or an attribute value; if an error occurred on the server
hasOperationSucceeded(Message)will returnfalseand the result will be aStringcorresponding to the server exception - Throws:
Exception
-