## org.hornetq.rest
Class Hornetq

    java.lang.Object
      org.hornetq.rest.Hornetq

    public class Hornetq

extends java.lang.Object

Version:
  $Revision: 1 $
Author:
  Bill Burke

Constructor Summary
`Hornetq()`

Method Summary

`static

`<T> T`

`

`getEntity(org.hornetq.api.core.client.ClientMessage message, java.lang.Class<T> type)`
Extract an object using a built-in RESTEasy JAX-RS MessageBodyReader

`static

`<T> T`

`

`getEntity(org.hornetq.api.core.client.ClientMessage message, java.lang.Class<T> type, org.jboss.resteasy.spi.ResteasyProviderFactory factory)`
Extract an object using a built-in RESTEasy JAX-RS MessageBodyReader

`static

`<T> T`

`

`getEntity(org.hornetq.api.core.client.ClientMessage msg, java.lang.Class<T> type, java.lang.reflect.Type genericType, org.jboss.resteasy.spi.ResteasyProviderFactory factory)`

`static

`<T> T`

`

`getEntity(org.hornetq.api.core.client.ClientMessage message, org.jboss.resteasy.util.GenericType<T> type, org.jboss.resteasy.spi.ResteasyProviderFactory factory)`
Extract an object using a built-in RESTEasy JAX-RS MessageBodyReader

`static java.lang.String` `getHttpHeader(org.hornetq.api.core.client.ClientMessage message, java.lang.String name)` Get an HTTP header value from a JMS Message
`static boolean` `isHttpMessage(org.hornetq.api.core.client.ClientMessage msg)` Was this HornetQ message generated from a REST call?
`static void` `setEntity(org.hornetq.api.core.client.ClientMessage message, java.io.Serializable object)` Sets the message body to a serialized byte array of the object.
`static void` `setEntity(org.hornetq.api.core.client.ClientMessage message, java.io.Serializable object, java.lang.String contentType)` Sets a message property to be the Content-Type passed in.
`static void` `setHttpHeader(org.hornetq.api.core.client.ClientMessage message, java.lang.String name, java.lang.String value)`

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

Constructor Detail

### Hornetq

    public Hornetq()

Method Detail

### setEntity

    public static void setEntity(org.hornetq.api.core.client.ClientMessage message,
                                 java.io.Serializable object)

  Sets the message body to a serialized byte array of the object. HTTP consumers will have to provide an Accept header to marshal the object

  Parameters:
    `message` -
    `object` -

### setEntity

    public static void setEntity(org.hornetq.api.core.client.ClientMessage message,
                                 java.io.Serializable object,
                                 java.lang.String contentType)

  Sets a message property to be the Content-Type passed in. Sets the message body to a serialized byte array of the object.

  Parameters:
    `message` -
    `object` -
    `contentType` - HTTP Content-Type header

### setHttpHeader

    public static void setHttpHeader(org.hornetq.api.core.client.ClientMessage message,
                                     java.lang.String name,
                                     java.lang.String value)

### getHttpHeader

    public static java.lang.String getHttpHeader(org.hornetq.api.core.client.ClientMessage message,
                                                 java.lang.String name)

  Get an HTTP header value from a JMS Message

  Parameters:
    `message` -
    `name` -
  Returns:

### getEntity

    public static <T> T getEntity(org.hornetq.api.core.client.ClientMessage message,
                                  java.lang.Class<T> type)

  Extract an object using a built-in RESTEasy JAX-RS MessageBodyReader

  Type Parameters:
    `T` -
  Parameters:
    `message` -
    `type` -
  Returns:

### getEntity

    public static <T> T getEntity(org.hornetq.api.core.client.ClientMessage message,
                                  java.lang.Class<T> type,
                                  org.jboss.resteasy.spi.ResteasyProviderFactory factory)

  Extract an object using a built-in RESTEasy JAX-RS MessageBodyReader

  Type Parameters:
    `T` -
  Parameters:
    `message` -
    `type` -
    `factory` -
  Returns:

### getEntity

    public static <T> T getEntity(org.hornetq.api.core.client.ClientMessage message,
                                  org.jboss.resteasy.util.GenericType<T> type,
                                  org.jboss.resteasy.spi.ResteasyProviderFactory factory)
                       throws UnknownMediaType,
                              UnmarshalException

  Extract an object using a built-in RESTEasy JAX-RS MessageBodyReader

  Type Parameters:
    `T` -
  Parameters:
    `message` -
    `type` -
    `factory` -
  Returns:
  Throws:
    `UnknownMediaType`
    `UnmarshalException`

### getEntity

    public static <T> T getEntity(org.hornetq.api.core.client.ClientMessage msg,
                                  java.lang.Class<T> type,
                                  java.lang.reflect.Type genericType,
                                  org.jboss.resteasy.spi.ResteasyProviderFactory factory)

### isHttpMessage

    public static boolean isHttpMessage(org.hornetq.api.core.client.ClientMessage msg)

  Was this HornetQ message generated from a REST call?

  Parameters:
    `msg` -
  Returns:

Copyright © 2013. All Rights Reserved.