public class SubscriptionsResource extends Object implements TimeoutTask.Callback
Modifier and Type | Field and Description |
---|---|
protected int |
consumerTimeoutSeconds |
protected String |
destination |
protected ConcurrentMap<String,QueueConsumer> |
queueConsumers |
protected DestinationServiceManager |
serviceManager |
protected AtomicLong |
sessionCounter |
protected ClientSessionFactory |
sessionFactory |
protected String |
startup |
Constructor and Description |
---|
SubscriptionsResource() |
Modifier and Type | Method and Description |
---|---|
protected QueueConsumer |
createConsumer(boolean durable,
boolean autoAck,
String subscriptionName,
String selector,
long timeout,
boolean deleteWhenIdle) |
javax.ws.rs.core.Response |
createSubscription(boolean durable,
boolean autoAck,
String subscriptionName,
String selector,
Boolean destroyWhenIdle,
Long timeout,
javax.ws.rs.core.UriInfo uriInfo) |
void |
deleteAckSubscription(javax.ws.rs.core.UriInfo uriInfo,
String consumerId) |
void |
deleteSubscription(javax.ws.rs.core.UriInfo uriInfo,
String consumerId) |
QueueConsumer |
findAcknoledgeSubscription(String subscriptionId) |
QueueConsumer |
findAutoAckSubscription(String subscriptionId) |
protected String |
generateSubscriptionName() |
javax.ws.rs.core.Response |
getAcknowledgedConsumer(String consumerId,
javax.ws.rs.core.UriInfo uriInfo) |
javax.ws.rs.core.Response |
getAutoAckSubscription(String consumerId,
javax.ws.rs.core.UriInfo uriInfo) |
int |
getConsumerTimeoutSeconds() |
String |
getDestination() |
DestinationServiceManager |
getServiceManager() |
ClientSessionFactory |
getSessionFactory() |
javax.ws.rs.core.Response |
headAcknowledgedConsumer(String consumerId,
javax.ws.rs.core.UriInfo uriInfo) |
javax.ws.rs.core.Response |
headAutoAckSubscription(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 ConcurrentMap<String,QueueConsumer> queueConsumers
protected ClientSessionFactory sessionFactory
protected String destination
protected final String startup
protected AtomicLong sessionCounter
protected int consumerTimeoutSeconds
protected DestinationServiceManager serviceManager
public DestinationServiceManager getServiceManager()
public void setServiceManager(DestinationServiceManager serviceManager)
public int getConsumerTimeoutSeconds()
public void setConsumerTimeoutSeconds(int consumerTimeoutSeconds)
public ClientSessionFactory getSessionFactory()
public void setSessionFactory(ClientSessionFactory sessionFactory)
public String getDestination()
public void setDestination(String destination)
public boolean testTimeout(String target, boolean autoShutdown)
testTimeout
in interface TimeoutTask.Callback
public void shutdown(String target)
shutdown
in interface TimeoutTask.Callback
public void stop()
protected String generateSubscriptionName()
@POST public javax.ws.rs.core.Response createSubscription(@FormParam(value="durable") @DefaultValue(value="false") boolean durable, @FormParam(value="autoAck") @DefaultValue(value="true") boolean autoAck, @FormParam(value="name") String subscriptionName, @FormParam(value="selector") String selector, @FormParam(value="delete-when-idle") Boolean destroyWhenIdle, @FormParam(value="idle-timeout") Long timeout, @Context javax.ws.rs.core.UriInfo uriInfo)
protected QueueConsumer createConsumer(boolean durable, boolean autoAck, String subscriptionName, String selector, long timeout, boolean deleteWhenIdle) throws ActiveMQException
ActiveMQException
@Path(value="auto-ack/{consumer-id}") @GET public javax.ws.rs.core.Response getAutoAckSubscription(@PathParam(value="consumer-id") String consumerId, @Context javax.ws.rs.core.UriInfo uriInfo) throws Exception
Exception
@Path(value="auto-ack/{consumer-id}") @HEAD public javax.ws.rs.core.Response headAutoAckSubscription(@PathParam(value="consumer-id") String consumerId, @Context javax.ws.rs.core.UriInfo uriInfo) throws Exception
Exception
@Path(value="auto-ack/{subscription-id}") public QueueConsumer findAutoAckSubscription(@PathParam(value="subscription-id") String subscriptionId)
@Path(value="acknowledged/{consumer-id}") @GET public javax.ws.rs.core.Response getAcknowledgedConsumer(@PathParam(value="consumer-id") String consumerId, @Context javax.ws.rs.core.UriInfo uriInfo) throws Exception
Exception
@Path(value="acknowledged/{consumer-id}") @HEAD public javax.ws.rs.core.Response headAcknowledgedConsumer(@PathParam(value="consumer-id") String consumerId, @Context javax.ws.rs.core.UriInfo uriInfo) throws Exception
Exception
@Path(value="acknowledged/{subscription-id}") public QueueConsumer findAcknoledgeSubscription(@PathParam(value="subscription-id") String subscriptionId)
@Path(value="acknowledged/{subscription-id}") @DELETE public void deleteAckSubscription(@Context javax.ws.rs.core.UriInfo uriInfo, @PathParam(value="subscription-id") String consumerId)
@Path(value="auto-ack/{subscription-id}") @DELETE public void deleteSubscription(@Context javax.ws.rs.core.UriInfo uriInfo, @PathParam(value="subscription-id") String consumerId)
Copyright © 2016 The Apache Software Foundation. All rights reserved.