public class AMQSession_0_8 extends AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>
| Modifier and Type | Class and Description |
|---|---|
static class |
AMQSession_0_8.DestinationCache<T extends AMQDestination> |
AMQSession.Dispatchable, AMQSession.IdToConsumerMap<C extends BasicMessageConsumer>| Modifier and Type | Field and Description |
|---|---|
static String |
QPID_SYNC_AFTER_CLIENT_ACK |
DEAMON_DISPATCHER_THREAD, IMMEDIATE_PREFETCH, IMMEDIATE_PREFETCH_DEFAULT, STRICT_AMQP, STRICT_AMQP_DEFAULT, STRICT_AMQP_FATAL, STRICT_AMQP_FATAL_DEFAULTNO_ACKNOWLEDGE, PRE_ACKNOWLEDGE| Modifier | Constructor and Description |
|---|---|
protected |
AMQSession_0_8(AMQConnection con,
int channelId,
boolean transacted,
int acknowledgeMode,
MessageFactoryRegistry messageFactoryRegistry,
int defaultPrefetchHighMark,
int defaultPrefetchLowMark)
Creates a new session on a connection.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
acknowledgeImpl() |
void |
acknowledgeMessage(long deliveryTag,
boolean multiple)
Acknowledge one or many messages.
|
void |
commitImpl() |
BasicMessageConsumer_0_8 |
createMessageConsumer(AMQDestination destination,
int prefetchHigh,
int prefetchLow,
boolean noLocal,
boolean exclusive,
String messageSelector,
FieldTable arguments,
boolean noConsume,
boolean autoClose) |
BasicMessageProducer_0_8 |
createMessageProducer(javax.jms.Destination destination,
Boolean mandatory,
Boolean immediate,
long producerId) |
protected AMQShortString |
declareQueue(AMQDestination amqd,
boolean noLocal,
boolean nowait,
boolean passive) |
protected void |
deleteTemporaryDestination(org.apache.qpid.client.TemporaryDestination amqQueue)
Undeclares the specified temporary queue/topic.
|
protected void |
doBind(AMQDestination dest,
AMQDestination.Binding binding,
String queue,
String exchange) |
protected void |
doUnbind(AMQDestination.Binding binding,
String queue,
String exchange) |
protected boolean |
exchangeExists(AMQShortString exchangeName) |
protected void |
flushAcknowledgments() |
AMQException |
getLastException() |
AMQMessageDelegateFactory |
getMessageDelegateFactory() |
MethodRegistry |
getMethodRegistry() |
AMQSession_0_8.DestinationCache<AMQQueue> |
getQueueDestinationCache() |
AMQSession_0_8.DestinationCache<AMQTopic> |
getTopicDestinationCache() |
protected void |
handleQueueNodeCreation(AMQDestination dest,
boolean noLocal) |
protected boolean |
isBound(AMQShortString exchangeName,
AMQShortString queueName,
AMQShortString routingKey)
Checks if a particular queue is bound to an exchange with a given key.
|
boolean |
isExchangeExist(AMQDestination dest,
boolean assertNode) |
boolean |
isFlowBlocked()
Tests whether flow to this session is blocked.
|
boolean |
isQueueBound(AMQDestination destination) |
boolean |
isQueueBound(AMQShortString exchangeName,
AMQShortString queueName,
AMQShortString routingKey)
Tests whether or not the specified queue is bound to the specified exchange under a particular routing key.
|
boolean |
isQueueBound(String exchangeName,
String queueName,
String bindingKey,
Map<String,Object> args) |
boolean |
isQueueExist(AMQDestination dest,
boolean assertNode) |
boolean |
isQueueExist(String queueName,
boolean assertNode,
boolean durable,
boolean autoDelete,
boolean exclusive,
Map<String,Object> args) |
void |
messageReceived(UnprocessedMessage message)
Invoked by the MINA IO thread (indirectly) when a message is received from the transport.
|
void |
rejectMessage(long deliveryTag,
boolean requeue) |
void |
releaseForRollback() |
protected Long |
requestQueueDepth(AMQDestination amqd,
boolean sync) |
void |
resolveAddress(AMQDestination dest,
boolean isConsumer,
boolean noLocal)
1.
|
int |
resolveAddressType(AMQDestination dest) |
void |
sendClose(long timeout) |
void |
sendConsume(BasicMessageConsumer_0_8 consumer,
AMQShortString queueName,
boolean nowait,
int tag) |
void |
sendCreateQueue(AMQShortString name,
boolean autoDelete,
boolean durable,
boolean exclusive,
Map<String,Object> arguments) |
void |
sendExchangeDeclare(AMQShortString name,
AMQShortString type,
boolean nowait,
boolean durable,
boolean autoDelete,
boolean internal) |
void |
sendExchangeDeclare(AMQShortString name,
AMQShortString type,
boolean nowait,
boolean durable,
boolean autoDelete,
FieldTable arguments,
boolean passive) |
void |
sendExchangeDelete(String name) |
void |
sendQueueBind(AMQShortString queueName,
AMQShortString routingKey,
FieldTable arguments,
AMQShortString exchangeName,
AMQDestination destination,
boolean nowait) |
void |
sendQueueDelete(AMQShortString queueName) |
void |
sendRecover() |
void |
sendRollback() |
void |
sendSuspendChannel(boolean suspend) |
void |
setFlowControl(boolean active) |
void |
setPrefetchLimits(int messagePrefetch,
long sizePrefetch) |
void |
sync() |
protected boolean |
tagLE(long tag1,
long tag2) |
protected boolean |
updateRollbackMark(long currentMark,
long deliveryTag) |
acknowledge, addBindingKey, addDeliveredMessage, addUnacknowledgedMessage, bindQueue, bindQueue, checkNotClosed, checkTransacted, checkValidTopic, checkValidTopic, close, close, closed, commit, confirmConsumerCancelled, createBrowser, createBrowser, createBrowserConsumer, createBytesMessage, createConsumer, createConsumer, createConsumer, createConsumer, createConsumer, createConsumer, createConsumerImpl, createDurableSubscriber, createDurableSubscriber, createListMessage, createMapMessage, createMessage, createObjectMessage, createObjectMessage, createProducer, createProducer, createProducer, createPublisher, createQueue, createQueue, createQueue, createQueueReceiver, createQueueReceiver, createReceiver, createReceiver, createSender, createStreamMessage, createSubscriber, createSubscriber, createTemporaryQueue, createTemporaryTopic, createTextMessage, createTextMessage, createTopic, declareAndBind, declareAndBind, declareExchange, declareQueue, declareQueue, deleteQueue, dispatch, getAcknowledgeMode, getAMQConnection, getChannelId, getConsumers, getDefaultPrefetch, getDefaultPrefetchHigh, getDefaultPrefetchLow, getDefaultQueueExchangeName, getDefaultTopicExchangeName, getDeliveredMessageTags, getDispatcher, getDispatcherThread, getFailoverMutex, getHighestDeliveryTag, getMessageFactoryRegistry, getMessageListener, getPrefetch, getPrefetchedMessageTags, getQueueDepth, getQueueDepth, getTemporaryQueueExchangeName, getTemporaryTopicExchangeName, getTicket, getTransacted, getUnacknowledgedMessageTags, hasConsumer, hasFailedOverDirty, hasMessageListeners, isClosed, isClosing, isDeclareExchanges, isImmediatePrefetch, isStrictAMQP, isSuspended, isTransacted, markClean, markDirty, prefetch, preprocessAddressTopic, recover, rejectMessage, rejectMessage, rollback, run, setLegacyFieldsForQueueType, setLegacyFieldsForTopicType, setMessageListener, setTicket, setUsingDispatcherForCleanup, stopDispatcherThread, suspendChannel, unsubscribe, verifySubjectresetClosedFlag, setClosed, setClosingpublic static final String QPID_SYNC_AFTER_CLIENT_ACK
protected AMQSession_0_8(AMQConnection con, int channelId, boolean transacted, int acknowledgeMode, MessageFactoryRegistry messageFactoryRegistry, int defaultPrefetchHighMark, int defaultPrefetchLowMark)
con - The connection on which to create the session.channelId - The unique identifier for the session.transacted - Indicates whether or not the session is transactional.acknowledgeMode - The acknowledgement mode for the session.messageFactoryRegistry - The message factory factory for the session.defaultPrefetchHighMark - The maximum number of messages to prefetched before suspending the session.defaultPrefetchLowMark - The number of prefetched messages at which to resume the session.protected void acknowledgeImpl()
throws javax.jms.JMSException
acknowledgeImpl in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>javax.jms.JMSExceptionpublic void acknowledgeMessage(long deliveryTag,
boolean multiple)
AMQSessionacknowledgeMessage in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>deliveryTag - The tag of the last message to be acknowledged.multiple - true to acknowledge all messages up to and including the one specified by the
delivery tag, false to just acknowledge that message.
TODO Be aware of possible changes to parameter order as versions change.public void sendQueueBind(AMQShortString queueName, AMQShortString routingKey, FieldTable arguments, AMQShortString exchangeName, AMQDestination destination, boolean nowait) throws AMQException, FailoverException
sendQueueBind in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>AMQExceptionFailoverExceptionpublic void sendClose(long timeout)
throws AMQException,
FailoverException
sendClose in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>AMQExceptionFailoverExceptionpublic void commitImpl()
throws AMQException,
FailoverException,
TransportException
commitImpl in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>AMQExceptionFailoverExceptionTransportExceptionpublic void sendCreateQueue(AMQShortString name, boolean autoDelete, boolean durable, boolean exclusive, Map<String,Object> arguments) throws AMQException, FailoverException
sendCreateQueue in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>AMQExceptionFailoverExceptionpublic void sendRecover()
throws AMQException,
FailoverException
sendRecover in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>AMQExceptionFailoverExceptionpublic void releaseForRollback()
releaseForRollback in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>public void rejectMessage(long deliveryTag,
boolean requeue)
rejectMessage in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>public boolean isQueueBound(AMQDestination destination) throws javax.jms.JMSException
isQueueBound in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>javax.jms.JMSExceptionpublic boolean isQueueBound(AMQShortString exchangeName, AMQShortString queueName, AMQShortString routingKey) throws javax.jms.JMSException
AMQSessionNote that this operation automatically retries in the event of fail-over.
isQueueBound in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>exchangeName - The exchange name to test for binding against.queueName - The queue name to check if bound.routingKey - The routing key to check if the queue is bound under.javax.jms.JMSException - If the query fails for any reason.
TODO Be aware of possible changes to parameter order as versions change.protected boolean isBound(AMQShortString exchangeName, AMQShortString queueName, AMQShortString routingKey) throws AMQException
isBound in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>AMQExceptionprotected boolean exchangeExists(AMQShortString exchangeName) throws AMQException
AMQExceptionpublic void sendConsume(BasicMessageConsumer_0_8 consumer, AMQShortString queueName, boolean nowait, int tag) throws AMQException, FailoverException
sendConsume in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>AMQExceptionFailoverExceptionpublic void sendExchangeDeclare(AMQShortString name, AMQShortString type, boolean nowait, boolean durable, boolean autoDelete, boolean internal) throws AMQException, FailoverException
sendExchangeDeclare in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>AMQExceptionFailoverExceptionpublic void sendExchangeDeclare(AMQShortString name, AMQShortString type, boolean nowait, boolean durable, boolean autoDelete, FieldTable arguments, boolean passive) throws AMQException, FailoverException
sendExchangeDeclare in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>AMQExceptionFailoverExceptionpublic void sendExchangeDelete(String name) throws AMQException, FailoverException
AMQExceptionFailoverExceptionprotected AMQShortString declareQueue(AMQDestination amqd, boolean noLocal, boolean nowait, boolean passive) throws AMQException
declareQueue in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>AMQExceptionpublic void sendQueueDelete(AMQShortString queueName) throws AMQException, FailoverException
sendQueueDelete in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>AMQExceptionFailoverExceptionpublic void sendSuspendChannel(boolean suspend)
throws AMQException,
FailoverException
sendSuspendChannel in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>AMQExceptionFailoverExceptionpublic BasicMessageConsumer_0_8 createMessageConsumer(AMQDestination destination, int prefetchHigh, int prefetchLow, boolean noLocal, boolean exclusive, String messageSelector, FieldTable arguments, boolean noConsume, boolean autoClose) throws javax.jms.JMSException
createMessageConsumer in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>javax.jms.JMSExceptionpublic BasicMessageProducer_0_8 createMessageProducer(javax.jms.Destination destination, Boolean mandatory, Boolean immediate, long producerId) throws javax.jms.JMSException
createMessageProducer in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>javax.jms.JMSExceptionpublic void messageReceived(UnprocessedMessage message)
AMQSessionmessageReceived in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>message - the message that has been receivedpublic void sendRollback()
throws AMQException,
FailoverException
sendRollback in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>AMQExceptionFailoverExceptionpublic void setPrefetchLimits(int messagePrefetch,
long sizePrefetch)
throws AMQException
AMQExceptionpublic AMQSession_0_8.DestinationCache<AMQQueue> getQueueDestinationCache()
public AMQSession_0_8.DestinationCache<AMQTopic> getTopicDestinationCache()
protected Long requestQueueDepth(AMQDestination amqd, boolean sync) throws AMQException, FailoverException
requestQueueDepth in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>AMQExceptionFailoverExceptionprotected boolean tagLE(long tag1,
long tag2)
tagLE in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>protected boolean updateRollbackMark(long currentMark,
long deliveryTag)
updateRollbackMark in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>public AMQMessageDelegateFactory getMessageDelegateFactory()
getMessageDelegateFactory in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>public void sync()
throws AMQException
sync in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>AMQExceptionpublic void resolveAddress(AMQDestination dest, boolean isConsumer, boolean noLocal) throws AMQException
AMQSessionresolveAddress in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>AMQExceptionpublic int resolveAddressType(AMQDestination dest) throws AMQException
resolveAddressType in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>AMQExceptionprotected void handleQueueNodeCreation(AMQDestination dest, boolean noLocal) throws AMQException
handleQueueNodeCreation in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>AMQExceptionprotected void doBind(AMQDestination dest, AMQDestination.Binding binding, String queue, String exchange) throws AMQException
doBind in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>AMQExceptionprotected void doUnbind(AMQDestination.Binding binding, String queue, String exchange) throws AMQException
AMQExceptionpublic boolean isQueueExist(AMQDestination dest, boolean assertNode) throws AMQException
isQueueExist in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>AMQExceptionpublic boolean isQueueExist(String queueName, boolean assertNode, boolean durable, boolean autoDelete, boolean exclusive, Map<String,Object> args) throws AMQException
AMQExceptionpublic boolean isExchangeExist(AMQDestination dest, boolean assertNode) throws AMQException
isExchangeExist in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>AMQExceptionprotected void flushAcknowledgments()
flushAcknowledgments in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>protected void deleteTemporaryDestination(org.apache.qpid.client.TemporaryDestination amqQueue) throws javax.jms.JMSException
AMQSessionNote that this operation automatically retries in the event of fail-over.
deleteTemporaryDestination in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>amqQueue - The name of the temporary destination to delete.javax.jms.JMSException - If the queue could not be deleted for any reason.
TODO Be aware of possible changes to parameter order as versions change.public boolean isQueueBound(String exchangeName, String queueName, String bindingKey, Map<String,Object> args) throws javax.jms.JMSException
isQueueBound in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>javax.jms.JMSExceptionpublic MethodRegistry getMethodRegistry()
public AMQException getLastException()
getLastException in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>public boolean isFlowBlocked()
AMQSessionisFlowBlocked in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>public void setFlowControl(boolean active)
setFlowControl in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>Copyright © 2006–2014 The Apache Software Foundation. All rights reserved.