## org.hornetq.rest.queue
Class PostMessage

    java.lang.Object
      org.hornetq.rest.queue.PostMessage

Direct Known Subclasses:
  PostMessageDupsOk, PostMessageNoDups

    public class PostMessage

extends java.lang.Object

Version:
  $Revision: 1 $
Author:
  Bill Burke

Nested Class Summary
`protected static class` `PostMessage.Pooled`

Field Summary
`protected boolean` `defaultDurable`
`protected java.lang.String` `destination`
`protected java.util.concurrent.ArrayBlockingQueue<PostMessage.Pooled>` `pool`
`protected int` `poolSize`
`protected DestinationServiceManager` `serviceManager`
`protected org.hornetq.api.core.client.ClientSessionFactory` `sessionFactory`

Constructor Summary
`PostMessage()`

Method Summary
`protected void` `addPooled()`
`void` `cleanup()`
`protected org.hornetq.api.core.client.ClientMessage` `createHornetQMessage(javax.ws.rs.core.HttpHeaders headers, byte[] body, boolean durable, java.lang.Long expiration, java.lang.Integer priority, org.hornetq.api.core.client.ClientSession session)`
`protected java.lang.String` `generateDupId()`
`java.lang.String` `getDestination()`
`protected PostMessage.Pooled` `getPooled()`
`int` `getPoolSize()`
`DestinationServiceManager` `getServiceManager()`
`org.hornetq.api.core.client.ClientSessionFactory` `getSessionFactory()`
`void` `init()`
`boolean` `isDefaultDurable()`
`javax.ws.rs.core.Response` `postWithId(java.lang.String dupId, java.lang.Boolean durable, java.lang.Long expiration, java.lang.Integer priority, javax.ws.rs.core.HttpHeaders headers, javax.ws.rs.core.UriInfo uriInfo, byte[] body)`
`void` `publish(javax.ws.rs.core.HttpHeaders headers, byte[] body, java.lang.String dup, boolean durable, java.lang.Long expiration, java.lang.Integer priority)`
`javax.ws.rs.core.Response` `putWithId(java.lang.String dupId, java.lang.Boolean durable, java.lang.Long expiration, java.lang.Integer priority, javax.ws.rs.core.HttpHeaders headers, javax.ws.rs.core.UriInfo uriInfo, byte[] body)`
`void` `setDefaultDurable(boolean defaultDurable)`
`void` `setDestination(java.lang.String destination)`
`void` `setPoolSize(int poolSize)`
`void` `setServiceManager(DestinationServiceManager serviceManager)`
`void` `setSessionFactory(org.hornetq.api.core.client.ClientSessionFactory sessionFactory)`

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

Field Detail

### sessionFactory

    protected org.hornetq.api.core.client.ClientSessionFactory sessionFactory

### destination

    protected java.lang.String destination

### defaultDurable

    protected boolean defaultDurable

### serviceManager

    protected DestinationServiceManager serviceManager

### pool

    protected java.util.concurrent.ArrayBlockingQueue<PostMessage.Pooled> pool

### poolSize

    protected int poolSize

Constructor Detail

### PostMessage

    public PostMessage()

Method Detail

### generateDupId

    protected java.lang.String generateDupId()

### publish

    public void publish(javax.ws.rs.core.HttpHeaders headers,
                        byte[] body,
                        java.lang.String dup,
                        boolean durable,
                        java.lang.Long expiration,
                        java.lang.Integer priority)
                 throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### putWithId

    public javax.ws.rs.core.Response putWithId(java.lang.String dupId,
                                               java.lang.Boolean durable,
                                               java.lang.Long expiration,
                                               java.lang.Integer priority,
                                               @Context
                                               javax.ws.rs.core.HttpHeaders headers,
                                               @Context
                                               javax.ws.rs.core.UriInfo uriInfo,
                                               byte[] body)

### postWithId

    public javax.ws.rs.core.Response postWithId(java.lang.String dupId,
                                                java.lang.Boolean durable,
                                                java.lang.Long expiration,
                                                java.lang.Integer priority,
                                                @Context
                                                javax.ws.rs.core.HttpHeaders headers,
                                                @Context
                                                javax.ws.rs.core.UriInfo uriInfo,
                                                byte[] body)

### getServiceManager

    public DestinationServiceManager getServiceManager()

### setServiceManager

    public void setServiceManager(DestinationServiceManager serviceManager)

### getSessionFactory

    public org.hornetq.api.core.client.ClientSessionFactory getSessionFactory()

### setSessionFactory

    public void setSessionFactory(org.hornetq.api.core.client.ClientSessionFactory sessionFactory)

### getDestination

    public java.lang.String getDestination()

### setDestination

    public void setDestination(java.lang.String destination)

### isDefaultDurable

    public boolean isDefaultDurable()

### setDefaultDurable

    public void setDefaultDurable(boolean defaultDurable)

### getPoolSize

    public int getPoolSize()

### setPoolSize

    public void setPoolSize(int poolSize)

### init

    public void init()
              throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### addPooled

    protected void addPooled()
                      throws org.hornetq.api.core.HornetQException

  Throws:
    `org.hornetq.api.core.HornetQException`

### getPooled

    protected PostMessage.Pooled getPooled()
                                    throws java.lang.InterruptedException

  Throws:
    `java.lang.InterruptedException`

### cleanup

    public void cleanup()

### createHornetQMessage

    protected org.hornetq.api.core.client.ClientMessage createHornetQMessage(javax.ws.rs.core.HttpHeaders headers,
                                                                             byte[] body,
                                                                             boolean durable,
                                                                             java.lang.Long expiration,
                                                                             java.lang.Integer priority,
                                                                             org.hornetq.api.core.client.ClientSession session)
                                                                      throws java.lang.Exception

  Throws:
    `java.lang.Exception`

Copyright © 2013. All Rights Reserved.