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.DispatchableDAEMON_DISPATCHER_THREAD, DISPATCHER_SHUTDOWN_TIMEOUT_MS, DISPATCHER_SHUTDOWN_TIMEOUT_MS_DEFAULT, 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,
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,
Map<String,Object> arguments,
boolean noConsume,
boolean autoClose) |
BasicMessageProducer_0_8 |
createMessageProducer(javax.jms.Destination destination,
Boolean mandatory,
Boolean immediate,
long producerId) |
protected String |
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 |
ensureCreditForReceive() |
protected boolean |
exchangeExists(String exchangeName) |
protected void |
flushAcknowledgments() |
QpidException |
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 void |
incUnacknowledgedMessages() |
protected boolean |
isBound(String exchangeName,
String queueName,
String 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(String exchangeName,
String queueName,
String 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.
|
protected void |
reduceCreditToOriginalSize() |
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,
String queueName,
boolean nowait,
int tag) |
void |
sendCreateQueue(String name,
boolean autoDelete,
boolean durable,
boolean exclusive,
Map<String,Object> arguments) |
void |
sendExchangeDeclare(String name,
String type,
boolean nowait,
boolean durable,
boolean autoDelete,
boolean internal) |
void |
sendExchangeDeclare(String name,
String type,
boolean nowait,
boolean durable,
boolean autoDelete,
Map<String,Object> arguments,
boolean passive) |
void |
sendExchangeDelete(String name,
boolean nowait) |
void |
sendQueueBind(String queueName,
String routingKey,
Map<String,Object> arguments,
String exchangeName,
AMQDestination destination,
boolean nowait) |
void |
sendQueueDelete(String queueName) |
void |
sendRecover() |
void |
sendRollback() |
void |
sendSuspendChannel(boolean suspend) |
void |
setFlowControl(boolean active) |
void |
setPrefetchLimits(int messagePrefetch,
long sizePrefetch) |
protected void |
stopFlowIfNeccessary() |
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, clearDispatchQueue, 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, createTemporaryQueueName, createTemporaryTopic, createTextMessage, createTextMessage, createTopic, declareAndBind, declareAndBind, declareExchange, declareQueue, declareQueue, deleteExchange, deleteQueue, dispatch, drainDispatchQueueWithDispatcher, getAcknowledgeMode, getAMQConnection, getChannelId, getConsumers, getDefaultPrefetch, getDefaultPrefetchHigh, getDefaultPrefetchLow, getDefaultQueueExchangeName, getDefaultTopicExchangeName, getDeliveredMessageTags, getDispatcher, getDispatcherThread, getFailoverMutex, getHighestDeliveryTag, getMessageEncryptionHelper, 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, stopExistingDispatcher, suspendChannel, suspendChannelIfNotClosing, unsubscribe, verifySubjectsetClosed, setClosingprotected AMQSession_0_8(AMQConnection con, int channelId, boolean transacted, int acknowledgeMode, 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.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(String queueName, String routingKey, Map<String,Object> arguments, String exchangeName, AMQDestination destination, boolean nowait) throws QpidException, FailoverException
sendQueueBind in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>QpidExceptionFailoverExceptionpublic void sendClose(long timeout)
throws QpidException,
FailoverException
sendClose in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>QpidExceptionFailoverExceptionpublic void commitImpl()
throws QpidException,
FailoverException,
TransportException
commitImpl in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>QpidExceptionFailoverExceptionTransportExceptionpublic void sendCreateQueue(String name, boolean autoDelete, boolean durable, boolean exclusive, Map<String,Object> arguments) throws QpidException, FailoverException
sendCreateQueue in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>QpidExceptionFailoverExceptionpublic void sendRecover()
throws QpidException,
FailoverException
sendRecover in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>QpidExceptionFailoverExceptionpublic 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(String exchangeName, String queueName, String 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(String exchangeName, String queueName, String routingKey) throws QpidException
isBound in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>QpidExceptionprotected boolean exchangeExists(String exchangeName) throws QpidException
QpidExceptionpublic void sendConsume(BasicMessageConsumer_0_8 consumer, String queueName, boolean nowait, int tag) throws QpidException, FailoverException
sendConsume in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>QpidExceptionFailoverExceptionpublic void sendExchangeDeclare(String name, String type, boolean nowait, boolean durable, boolean autoDelete, boolean internal) throws QpidException, FailoverException
sendExchangeDeclare in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>QpidExceptionFailoverExceptionpublic void sendExchangeDeclare(String name, String type, boolean nowait, boolean durable, boolean autoDelete, Map<String,Object> arguments, boolean passive) throws QpidException, FailoverException
sendExchangeDeclare in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>QpidExceptionFailoverExceptionpublic void sendExchangeDelete(String name, boolean nowait) throws QpidException, FailoverException
QpidExceptionFailoverExceptionprotected String declareQueue(AMQDestination amqd, boolean noLocal, boolean nowait, boolean passive) throws QpidException
declareQueue in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>QpidExceptionpublic void sendQueueDelete(String queueName) throws QpidException, FailoverException
sendQueueDelete in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>QpidExceptionFailoverExceptionpublic void sendSuspendChannel(boolean suspend)
throws QpidException,
FailoverException
sendSuspendChannel in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>QpidExceptionFailoverExceptionpublic BasicMessageConsumer_0_8 createMessageConsumer(AMQDestination destination, int prefetchHigh, int prefetchLow, boolean noLocal, boolean exclusive, String messageSelector, Map<String,Object> 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 QpidException,
FailoverException
sendRollback in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>QpidExceptionFailoverExceptionpublic void setPrefetchLimits(int messagePrefetch,
long sizePrefetch)
throws QpidException,
FailoverException
QpidExceptionFailoverExceptionprotected boolean ensureCreditForReceive()
throws QpidException
QpidExceptionprotected void reduceCreditToOriginalSize()
throws QpidException
QpidExceptionprotected void stopFlowIfNeccessary()
protected void incUnacknowledgedMessages()
public AMQSession_0_8.DestinationCache<AMQQueue> getQueueDestinationCache()
public AMQSession_0_8.DestinationCache<AMQTopic> getTopicDestinationCache()
protected Long requestQueueDepth(AMQDestination amqd, boolean sync) throws QpidException, FailoverException
requestQueueDepth in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>QpidExceptionFailoverExceptionprotected 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 QpidException
sync in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>QpidExceptionpublic void resolveAddress(AMQDestination dest, boolean isConsumer, boolean noLocal) throws QpidException
AMQSessionresolveAddress in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>QpidExceptionpublic int resolveAddressType(AMQDestination dest) throws QpidException
resolveAddressType in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>QpidExceptionprotected void handleQueueNodeCreation(AMQDestination dest, boolean noLocal) throws QpidException
handleQueueNodeCreation in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>QpidExceptionprotected void doBind(AMQDestination dest, AMQDestination.Binding binding, String queue, String exchange) throws QpidException
doBind in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>QpidExceptionprotected void doUnbind(AMQDestination.Binding binding, String queue, String exchange) throws QpidException
QpidExceptionpublic boolean isQueueExist(AMQDestination dest, boolean assertNode) throws QpidException
isQueueExist in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>QpidExceptionpublic boolean isQueueExist(String queueName, boolean assertNode, boolean durable, boolean autoDelete, boolean exclusive, Map<String,Object> args) throws QpidException
QpidExceptionpublic boolean isExchangeExist(AMQDestination dest, boolean assertNode) throws QpidException
isExchangeExist in class AMQSession<BasicMessageConsumer_0_8,BasicMessageProducer_0_8>QpidExceptionprotected 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 QpidException 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–2017 The Apache Software Foundation. All rights reserved.