public class ConsumersResource extends Object implements TimeoutTask.Callback
| Modifier and Type | Field and Description |
|---|---|
protected static int |
ACKNOWLEDGED |
protected int |
consumerTimeoutSeconds |
protected String |
destination |
protected ConcurrentHashMap<String,QueueConsumer> |
queueConsumers |
protected static int |
SELECTOR_SET |
protected DestinationServiceManager |
serviceManager |
protected AtomicLong |
sessionCounter |
protected ClientSessionFactory |
sessionFactory |
protected String |
startup |
| Constructor and Description |
|---|
ConsumersResource() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addConsumer(QueueConsumer consumer) |
void |
closeSession(String consumerId,
javax.ws.rs.core.UriInfo uriInfo) |
QueueConsumer |
createAcknowledgedConsumer(String selector) |
QueueConsumer |
createConsumer(String selector) |
javax.ws.rs.core.Response |
createSubscription(boolean autoAck,
String selector,
javax.ws.rs.core.UriInfo uriInfo) |
QueueConsumer |
findConsumer(int attributes,
String consumerId,
javax.ws.rs.core.UriInfo uriInfo) |
javax.ws.rs.core.Response |
getConsumer(int attributes,
String consumerId,
javax.ws.rs.core.UriInfo uriInfo) |
int |
getConsumerTimeoutSeconds() |
String |
getDestination() |
DestinationServiceManager |
getServiceManager() |
ClientSessionFactory |
getSessionFactory() |
javax.ws.rs.core.Response |
headConsumer(int attributes,
String consumerId,
javax.ws.rs.core.UriInfo uriInfo) |
void |
setConsumerTimeoutSeconds(int consumerTimeoutSeconds) |
void |
setDestination(String destination) |
void |
setServiceManager(DestinationServiceManager serviceManager) |
void |
setSessionFactory(ClientSessionFactory sessionFactory) |
void |
shutdown(String target) |
void |
stop() |
boolean |
testTimeout(String target,
boolean autoShutdown) |
protected ConcurrentHashMap<String,QueueConsumer> queueConsumers
protected ClientSessionFactory sessionFactory
protected String destination
protected final String startup
protected AtomicLong sessionCounter
protected int consumerTimeoutSeconds
protected DestinationServiceManager serviceManager
protected static final int ACKNOWLEDGED
protected static final int SELECTOR_SET
public DestinationServiceManager getServiceManager()
public void setServiceManager(DestinationServiceManager serviceManager)
public ClientSessionFactory getSessionFactory()
public void setSessionFactory(ClientSessionFactory sessionFactory)
public String getDestination()
public void setDestination(String destination)
public int getConsumerTimeoutSeconds()
public void setConsumerTimeoutSeconds(int consumerTimeoutSeconds)
public boolean testTimeout(String target, boolean autoShutdown)
testTimeout in interface TimeoutTask.Callbackpublic void shutdown(String target)
shutdown in interface TimeoutTask.Callbackpublic void stop()
@POST
public javax.ws.rs.core.Response createSubscription(@FormParam(value="autoAck") @DefaultValue(value="true")
boolean autoAck,
@FormParam(value="selector")
String selector,
@Context
javax.ws.rs.core.UriInfo uriInfo)
protected void addConsumer(QueueConsumer consumer)
public QueueConsumer createConsumer(String selector) throws HornetQException
HornetQExceptionpublic QueueConsumer createAcknowledgedConsumer(String selector) throws HornetQException
HornetQException@Path(value="attributes-{attributes}/{consumer-id}")
@GET
public javax.ws.rs.core.Response getConsumer(@PathParam(value="attributes")
int attributes,
@PathParam(value="consumer-id")
String consumerId,
@Context
javax.ws.rs.core.UriInfo uriInfo)
throws Exception
Exception@Path(value="attributes-{attributes}/{consumer-id}")
@HEAD
public javax.ws.rs.core.Response headConsumer(@PathParam(value="attributes")
int attributes,
@PathParam(value="consumer-id")
String consumerId,
@Context
javax.ws.rs.core.UriInfo uriInfo)
throws Exception
Exception@Path(value="attributes-{attributes}/{consumer-id}")
public QueueConsumer findConsumer(@PathParam(value="attributes")
int attributes,
@PathParam(value="consumer-id")
String consumerId,
@Context
javax.ws.rs.core.UriInfo uriInfo)
throws Exception
Exception@Path(value="attributes-{attributes}/{consumer-id}")
@DELETE
public void closeSession(@PathParam(value="consumer-id")
String consumerId,
@Context
javax.ws.rs.core.UriInfo uriInfo)
Copyright © 2016 JBoss, a division of Red Hat. All rights reserved.