Class JMSManagementHelper
- java.lang.Object
-
- org.apache.activemq.artemis.api.jms.management.JMSManagementHelper
-
public class JMSManagementHelper extends java.lang.ObjectHelper class to use JMS messages to manage ActiveMQ Artemis server resources.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.ObjectgetResult(javax.jms.Message message)Returns the result of an operation invocation or an attribute value.static java.lang.ObjectgetResult(javax.jms.Message message, java.lang.Class desiredType)Returns the result of an operation invocation or an attribute value.static java.lang.Object[]getResults(javax.jms.Message message)Returns the result of an operation invocation or an attribute value.static booleanhasOperationSucceeded(javax.jms.Message message)Returns whether the invocation of the management operation on the server resource succeeded.static booleanisAttributesResult(javax.jms.Message message)Returns whether the JMS message corresponds to the result of a management attribute value.static booleanisOperationResult(javax.jms.Message message)Returns whether the JMS message corresponds to the result of a management operation invocation.static voidputAttribute(javax.jms.Message message, java.lang.String resourceName, java.lang.String attribute)Stores a resource attribute in a JMS message to retrieve the value from the server resource.static voidputOperationInvocation(javax.jms.Message message, java.lang.String resourceName, java.lang.String operationName)Stores an operation invocation in a JMS message to invoke the corresponding operation the value from the server resource.static voidputOperationInvocation(javax.jms.Message message, java.lang.String resourceName, java.lang.String operationName, java.lang.Object... parameters)Stores an operation invocation in a JMS message to invoke the corresponding operation the value from the server resource.
-
-
-
Method Detail
-
putAttribute
public static void putAttribute(javax.jms.Message message, java.lang.String resourceName, java.lang.String attribute) throws javax.jms.JMSExceptionStores 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:
javax.jms.JMSException- if an exception occurs while putting the information in the message- See Also:
ResourceNames
-
putOperationInvocation
public static void putOperationInvocation(javax.jms.Message message, java.lang.String resourceName, java.lang.String operationName) throws javax.jms.JMSExceptionStores 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:
javax.jms.JMSException- if an exception occurs while putting the information in the message- See Also:
ResourceNames
-
putOperationInvocation
public static void putOperationInvocation(javax.jms.Message message, java.lang.String resourceName, java.lang.String operationName, java.lang.Object... parameters) throws javax.jms.JMSExceptionStores 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:
javax.jms.JMSException- if an exception occurs while putting the information in the message- See Also:
ResourceNames
-
isOperationResult
public static boolean isOperationResult(javax.jms.Message message) throws javax.jms.JMSExceptionReturns whether the JMS message corresponds to the result of a management operation invocation.- Throws:
javax.jms.JMSException
-
isAttributesResult
public static boolean isAttributesResult(javax.jms.Message message) throws javax.jms.JMSExceptionReturns whether the JMS message corresponds to the result of a management attribute value.- Throws:
javax.jms.JMSException
-
hasOperationSucceeded
public static boolean hasOperationSucceeded(javax.jms.Message message) throws javax.jms.JMSExceptionReturns whether the invocation of the management operation on the server resource succeeded.- Throws:
javax.jms.JMSException
-
getResults
public static java.lang.Object[] getResults(javax.jms.Message message) throws java.lang.ExceptionReturns the result of an operation invocation or an attribute value.
If an error occurred on the server,hasOperationSucceeded(Message)will returnfalse. and the result will be a String corresponding to the server exception.- Throws:
java.lang.Exception
-
getResult
public static java.lang.Object getResult(javax.jms.Message message) throws java.lang.ExceptionReturns the result of an operation invocation or an attribute value.
If an error occurred on the server,hasOperationSucceeded(Message)will returnfalse. and the result will be a String corresponding to the server exception.- Throws:
java.lang.Exception
-
getResult
public static java.lang.Object getResult(javax.jms.Message message, java.lang.Class desiredType) throws java.lang.ExceptionReturns the result of an operation invocation or an attribute value.
If an error occurred on the server,hasOperationSucceeded(Message)will returnfalse. and the result will be a String corresponding to the server exception.- Throws:
java.lang.Exception
-
-