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.rest.queue
Class QueueConsumer

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

Direct Known Subclasses:
  AcknowledgedQueueConsumer, SubscriptionResource

    public class QueueConsumer

extends java.lang.Object

Auto-acknowleged consumer

Version:
  $Revision: 1 $
Author:
  Bill Burke

Field Summary
`protected boolean` | `autoAck`
`protected boolean` | `closed`
`protected org.hornetq.api.core.client.ClientConsumer` | `consumer`
`protected java.lang.String` | `destination`
`protected org.hornetq.api.core.client.ClientSessionFactory` | `factory`
`protected java.lang.String` | `id`
`protected ConsumedMessage` | `lastConsumed`
`protected long` | `lastPing`
`protected long` | `previousIndex` token used to create consume-next links
`protected java.lang.String` | `selector`
`protected DestinationServiceManager` | `serviceManager`
`protected org.hornetq.api.core.client.ClientSession` | `session`

Constructor Summary
`QueueConsumer(org.hornetq.api.core.client.ClientSessionFactory factory, java.lang.String destination, java.lang.String id, DestinationServiceManager serviceManager, java.lang.String selector)`

Method Summary
`protected javax.ws.rs.core.Response` | `checkIndexAndPoll(long wait, javax.ws.rs.core.UriInfo info, java.lang.String basePath, long index)`
`protected void` | `createSession()`
`long` | `getConsumeIndex()`
`java.lang.String` | `getId()`
`long` | `getLastPingTime()`
`protected javax.ws.rs.core.Response.ResponseBuilder` | `getMessageResponse(ConsumedMessage msg, javax.ws.rs.core.UriInfo info, java.lang.String basePath, java.lang.String index)`
`DestinationServiceManager` | `getServiceManager()`
`boolean` | `isClosed()`
`protected void` | `ping()`
`javax.ws.rs.core.Response` | `poll(long wait, long index, javax.ws.rs.core.UriInfo info)`
`protected javax.ws.rs.core.Response` | `pollWithIndex(long wait, javax.ws.rs.core.UriInfo info, java.lang.String basePath, long index)`
`protected org.hornetq.api.core.client.ClientMessage` | `receive(long timeoutSecs)`
`protected org.hornetq.api.core.client.ClientMessage` | `receiveFromConsumer(long timeoutSecs)`
`javax.ws.rs.core.Response` | `runPoll(long wait, javax.ws.rs.core.UriInfo info, java.lang.String basePath)`
`static void` | `setConsumeNextLink(LinkStrategy linkStrategy, javax.ws.rs.core.Response.ResponseBuilder response, javax.ws.rs.core.UriInfo info, java.lang.String basePath, java.lang.String index)`
`protected void` | `setMessageResponseLinks(javax.ws.rs.core.UriInfo info, java.lang.String basePath, javax.ws.rs.core.Response.ResponseBuilder responseBuilder, java.lang.String index)`
`protected void` | `setPollTimeoutLinks(javax.ws.rs.core.UriInfo info, java.lang.String basePath, javax.ws.rs.core.Response.ResponseBuilder builder, java.lang.String index)`
`void` | `setServiceManager(DestinationServiceManager serviceManager)`
`void` | `setSessionLink(javax.ws.rs.core.Response.ResponseBuilder response, javax.ws.rs.core.UriInfo info, java.lang.String basePath)`
`void` | `shutdown()`

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

Field Detail

### factory

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

### session

    protected org.hornetq.api.core.client.ClientSession session

### consumer

    protected org.hornetq.api.core.client.ClientConsumer consumer

### destination

    protected java.lang.String destination

### closed

    protected boolean closed

### id

    protected java.lang.String id

### lastPing

    protected long lastPing

### serviceManager

    protected DestinationServiceManager serviceManager

### autoAck

    protected boolean autoAck

### selector

    protected java.lang.String selector

### previousIndex

    protected long previousIndex

  token used to create consume-next links

### lastConsumed

    protected ConsumedMessage lastConsumed

Constructor Detail

### QueueConsumer

    public QueueConsumer(org.hornetq.api.core.client.ClientSessionFactory factory,
                         java.lang.String destination,
                         java.lang.String id,
                         DestinationServiceManager serviceManager,
                         java.lang.String selector)
                  throws org.hornetq.api.core.HornetQException

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

Method Detail

### getConsumeIndex

    public long getConsumeIndex()

### getServiceManager

    public DestinationServiceManager getServiceManager()

### setServiceManager

    public void setServiceManager(DestinationServiceManager serviceManager)

### getLastPingTime

    public long getLastPingTime()

### ping

    protected void ping()

### getId

    public java.lang.String getId()

### isClosed

    public boolean isClosed()

### shutdown

    public void shutdown()

### poll

    public javax.ws.rs.core.Response poll(@HeaderParam(value="Accept-Wait")
                                          long wait,
                                          long index,
                                          @Context
                                          javax.ws.rs.core.UriInfo info)

### runPoll

    public javax.ws.rs.core.Response runPoll(long wait,
                                             javax.ws.rs.core.UriInfo info,
                                             java.lang.String basePath)

### checkIndexAndPoll

    protected javax.ws.rs.core.Response checkIndexAndPoll(long wait,
                                                          javax.ws.rs.core.UriInfo info,
                                                          java.lang.String basePath,
                                                          long index)

### pollWithIndex

    protected javax.ws.rs.core.Response pollWithIndex(long wait,
                                                      javax.ws.rs.core.UriInfo info,
                                                      java.lang.String basePath,
                                                      long index)

### createSession

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

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

### receiveFromConsumer

    protected org.hornetq.api.core.client.ClientMessage receiveFromConsumer(long timeoutSecs)
                                                                     throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### receive

    protected org.hornetq.api.core.client.ClientMessage receive(long timeoutSecs)
                                                         throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### setPollTimeoutLinks

    protected void setPollTimeoutLinks(javax.ws.rs.core.UriInfo info,
                                       java.lang.String basePath,
                                       javax.ws.rs.core.Response.ResponseBuilder builder,
                                       java.lang.String index)

### getMessageResponse

    protected javax.ws.rs.core.Response.ResponseBuilder getMessageResponse(ConsumedMessage msg,
                                                                           javax.ws.rs.core.UriInfo info,
                                                                           java.lang.String basePath,
                                                                           java.lang.String index)

### setMessageResponseLinks

    protected void setMessageResponseLinks(javax.ws.rs.core.UriInfo info,
                                           java.lang.String basePath,
                                           javax.ws.rs.core.Response.ResponseBuilder responseBuilder,
                                           java.lang.String index)

### setConsumeNextLink

    public static void setConsumeNextLink(LinkStrategy linkStrategy,
                                          javax.ws.rs.core.Response.ResponseBuilder response,
                                          javax.ws.rs.core.UriInfo info,
                                          java.lang.String basePath,
                                          java.lang.String index)

### setSessionLink

    public void setSessionLink(javax.ws.rs.core.Response.ResponseBuilder response,
                               javax.ws.rs.core.UriInfo info,
                               java.lang.String basePath)

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 © 2012. All Rights Reserved.