Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hornetq.api.jms.management
Class JMSManagementHelper

    java.lang.Object
      org.hornetq.api.jms.management.JMSManagementHelper

    public class JMSManagementHelper

extends Object

Helper class to use JMS messages to manage HornetQ server resources.

Version:
  `$Revision$`
Author:
  Jeff Mesnil, Tim Fox

Method Summary
`static Object` | `getResult(Message message)` Returns the result of an operation invocation or an attribute value.
`static Object[]` | `getResults(Message message)` Returns the result of an operation invocation or an attribute value.
`static boolean` | `hasOperationSucceeded(Message message)` Returns whether the invocation of the management operation on the server resource succeeded.
`static boolean` | `isAttributesResult(Message message)` Returns whether the JMS message corresponds to the result of a management attribute value.
`static boolean` | `isOperationResult(Message message)` Returns whether the JMS message corresponds to the result of a management operation invocation.
`static void` | `putAttribute(Message message, String resourceName, String attribute)` Stores a resource attribute in a JMS message to retrieve the value from the server resource.
`static void` | `putOperationInvocation(Message message, String resourceName, String operationName)` Stores a operation invocation in a JMS message to invoke the corresponding operation the value from the server resource.
`static void` | `putOperationInvocation(Message message, String resourceName, String operationName, Object... parameters)` Stores a operation invocation in a JMS message to invoke the corresponding operation the value from the server resource.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### 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 message
    `resourceName` - the name of the resource
    `attribute` - the name of the attribute
  Throws:
    `JMSException` - if an exception occurs while putting the information in the message
  See Also:
    `ResourceNames`

### putOperationInvocation

    public static void putOperationInvocation(Message message,
                                              String resourceName,
                                              String operationName)
                                       throws JMSException

  Stores a operation invocation in a JMS message to invoke the corresponding operation the value from the server resource.

  Parameters:
    `message` - JMS message
    `resourceName` - the name of the resource
    `operationName` - 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:
    `ResourceNames`

### putOperationInvocation

    public static void putOperationInvocation(Message message,
                                              String resourceName,
                                              String operationName,
                                              Object... parameters)
                                       throws JMSException

  Stores a operation invocation in a JMS message to invoke the corresponding operation the value from the server resource.

  Parameters:
    `message` - JMS message
    `resourceName` - the name of the server resource
    `operationName` - the name of the operation to invoke on the server resource
    `parameters` - the parameters to use to invoke the server resource
  Throws:
    `JMSException` - if an exception occurs while putting the information in the message
  See Also:
    `ResourceNames`

### isOperationResult

    public static boolean isOperationResult(Message message)
                                     throws JMSException

  Returns whether the JMS message corresponds to the result of a management operation invocation.

  Throws:
    `JMSException`

### isAttributesResult

    public static boolean isAttributesResult(Message message)
                                      throws JMSException

  Returns whether the JMS message corresponds to the result of a management attribute value.

  Throws:
    `JMSException`

### hasOperationSucceeded

    public static boolean hasOperationSucceeded(Message message)
                                         throws JMSException

  Returns whether the invocation of the management operation on the server resource succeeded.

  Throws:
    `JMSException`

### getResults

    public static Object[] getResults(Message message)
                               throws Exception

  Returns the result of an operation invocation or an attribute value.
  If an error occurred on the server, `hasOperationSucceeded(Message)` will return `false`. and the result will be a String corresponding to the server exception.

  Throws:
    `Exception`

### getResult

    public static Object getResult(Message message)
                            throws Exception

  Returns the result of an operation invocation or an attribute value.
  If an error occurred on the server, `hasOperationSucceeded(Message)` will return `false`. and the result will be a String corresponding to the server exception.

  Throws:
    `Exception`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 Red Hat Inc. All Rights Reserved.