public class AMQSession_0_10 extends AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10> implements SessionListener
AMQSession.Dispatchable, AMQSession.IdToConsumerMap<C extends BasicMessageConsumer>DEAMON_DISPATCHER_THREAD, IMMEDIATE_PREFETCH, IMMEDIATE_PREFETCH_DEFAULT, STRICT_AMQP, STRICT_AMQP_DEFAULT, STRICT_AMQP_FATAL, STRICT_AMQP_FATAL_DEFAULTNO_ACKNOWLEDGE, PRE_ACKNOWLEDGE| Modifier and Type | Method and Description |
|---|---|
protected void |
acknowledgeImpl() |
void |
acknowledgeMessage(long deliveryTag,
boolean multiple)
Acknowledge one or many messages.
|
protected void |
addDeliveredMessage(long id)
Store non committed messages for this session
|
void |
closed(Session ssn) |
void |
commitImpl() |
BasicMessageConsumer_0_10 |
createMessageConsumer(AMQDestination destination,
int prefetchHigh,
int prefetchLow,
boolean noLocal,
boolean exclusive,
String messageSelector,
FieldTable rawSelector,
boolean noConsume,
boolean autoClose)
Create an 0_10 message consumer
|
BasicMessageProducer_0_10 |
createMessageProducer(javax.jms.Destination destination,
Boolean mandatory,
Boolean immediate,
long producerId)
Create an 0_10 message producer
|
protected Session |
createSession() |
protected AMQShortString |
declareQueue(AMQDestination amqd,
boolean noLocal,
boolean nowait,
boolean passive) |
protected void |
doBind(AMQDestination dest,
AMQDestination.Binding binding,
String queue,
String exchange) |
void |
exception(Session ssn,
SessionException exc) |
protected void |
flushAcknowledgments() |
AMQException |
getCurrentException()
Get the latest thrown exception.
|
AMQException |
getLastException() |
AMQMessageDelegateFactory |
getMessageDelegateFactory() |
protected Connection |
getQpidConnection() |
protected Session |
getQpidSession()
Access to the underlying Qpid Session
|
protected void |
handleQueueNodeCreation(AMQDestination dest,
boolean noLocal) |
protected boolean |
isBound(AMQShortString exchangeName,
AMQShortString amqQueueName,
AMQShortString routingKey) |
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)
Bind a queue with an exchange.
|
boolean |
isQueueBound(AMQShortString exchangeName,
AMQShortString queueName,
AMQShortString routingKey,
AMQShortString[] bindingKeys) |
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 |
message(Session ssn,
MessageTransfer xfr) |
void |
opened(Session ssn) |
void |
rejectMessage(long deliveryTag,
boolean requeue)
Release (0_8 notion of Reject) an acquired message
|
void |
releaseForRollback() |
protected Long |
requestQueueDepth(AMQDestination amqd,
boolean sync) |
int |
resolveAddressType(AMQDestination dest) |
void |
resumed(Session ssn) |
AMQShortString |
send0_10QueueDeclare(AMQDestination amqd,
boolean noLocal,
boolean nowait,
boolean passive)
Declare a queue with the given queueName
|
void |
sendClose(long timeout)
Close this session.
|
void |
sendConsume(BasicMessageConsumer_0_10 consumer,
AMQShortString queueName,
boolean nowait,
int tag)
This method is invoked when a consumer is created
Registers the consumer with the broker
|
void |
sendCreateQueue(AMQShortString name,
boolean autoDelete,
boolean durable,
boolean exclusive,
Map<String,Object> arguments)
Create a queue with a given name.
|
void |
sendExchangeDeclare(AMQShortString name,
AMQShortString type,
boolean nowait,
boolean durable,
boolean autoDelete,
boolean internal)
creates an exchange if it does not already exist
|
void |
sendExchangeDeclare(AMQShortString name,
AMQShortString type,
boolean nowait,
boolean durable,
boolean autoDelete,
FieldTable arguments,
boolean passive) |
void |
sendExchangeDeclare(String name,
String type,
String alternateExchange,
Map<String,Object> args,
boolean nowait,
boolean durable,
boolean autoDelete) |
void |
sendExchangeDelete(String name,
boolean nowait)
deletes an exchange
|
void |
sendQueueBind(AMQShortString queueName,
AMQShortString routingKey,
FieldTable arguments,
AMQShortString exchangeName,
AMQDestination destination,
boolean nowait)
Bind a queue with an exchange.
|
void |
sendQueueDelete(AMQShortString queueName)
deletes a queue
|
void |
sendRecover()
This method asks the broker to redeliver all unacknowledged messages
|
void |
sendRollback() |
void |
sendSuspendChannel(boolean suspend)
Activate/deactivate the message flow for all the consumers of this session.
|
protected void |
sendTxCompletionsIfNecessary()
With 0.10 messages are consumed with window mode, we must send a completion
before the window size is reached so credits don't dry up.
|
void |
setCurrentException(SessionException se) |
void |
setFlowControl(boolean active) |
void |
sync() |
protected boolean |
tagLE(long tag1,
long tag2) |
protected boolean |
updateRollbackMark(long currentMark,
long deliveryTag) |
acknowledge, addBindingKey, 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, deleteTemporaryDestination, 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, messageReceived, prefetch, preprocessAddressTopic, recover, rejectMessage, rejectMessage, resolveAddress, rollback, run, setLegacyFieldsForQueueType, setLegacyFieldsForTopicType, setMessageListener, setTicket, setUsingDispatcherForCleanup, stopDispatcherThread, suspendChannel, unsubscribe, verifySubjectresetClosedFlag, setClosed, setClosingprotected Session createSession()
protected Connection getQpidConnection()
public void acknowledgeMessage(long deliveryTag,
boolean multiple)
acknowledgeMessage in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>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.protected void flushAcknowledgments()
flushAcknowledgments in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>public void sendQueueBind(AMQShortString queueName, AMQShortString routingKey, FieldTable arguments, AMQShortString exchangeName, AMQDestination destination, boolean nowait) throws AMQException
sendQueueBind in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>queueName - Specifies the name of the queue to bind. If the queue name is empty,
refers to the current
queue for the session, which is the last declared queue.exchangeName - The exchange name.routingKey - Specifies the routing key for the binding.arguments - 0_8 specificAMQExceptionpublic void sendClose(long timeout)
throws AMQException,
FailoverException
sendClose in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>timeout - no used / 0_8 specificAMQExceptionFailoverExceptionpublic void sendCreateQueue(AMQShortString name, boolean autoDelete, boolean durable, boolean exclusive, Map<String,Object> arguments) throws AMQException, FailoverException
sendCreateQueue in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>name - The queue nameautoDelete - If this field is set and the exclusive field is also set,
then the queue is deleted when the connection closes.durable - If set when creating a new queue,
the queue will be marked as durable.exclusive - Exclusive queues can only be used from one connection at a time.arguments - Exclusive queues can only be used from one connection at a time.AMQExceptionFailoverExceptionpublic void sendRecover()
throws AMQException,
FailoverException
sendRecover in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>AMQExceptionFailoverExceptionpublic void releaseForRollback()
releaseForRollback in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>public void rejectMessage(long deliveryTag,
boolean requeue)
rejectMessage in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>deliveryTag - the message IDrequeue - always truepublic BasicMessageConsumer_0_10 createMessageConsumer(AMQDestination destination, int prefetchHigh, int prefetchLow, boolean noLocal, boolean exclusive, String messageSelector, FieldTable rawSelector, boolean noConsume, boolean autoClose) throws javax.jms.JMSException
createMessageConsumer in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>javax.jms.JMSExceptionpublic boolean isQueueBound(AMQShortString exchangeName, AMQShortString queueName, AMQShortString routingKey)
isQueueBound in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>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.public boolean isQueueBound(AMQDestination destination)
isQueueBound in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>public boolean isQueueBound(AMQShortString exchangeName, AMQShortString queueName, AMQShortString routingKey, AMQShortString[] bindingKeys)
public boolean isQueueBound(String exchangeName, String queueName, String bindingKey, Map<String,Object> args)
isQueueBound in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>protected boolean isBound(AMQShortString exchangeName, AMQShortString amqQueueName, AMQShortString routingKey)
isBound in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>public void sendConsume(BasicMessageConsumer_0_10 consumer, AMQShortString queueName, boolean nowait, int tag) throws AMQException, FailoverException
sendConsume in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>AMQExceptionFailoverExceptionpublic BasicMessageProducer_0_10 createMessageProducer(javax.jms.Destination destination, Boolean mandatory, Boolean immediate, long producerId) throws javax.jms.JMSException
createMessageProducer in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>javax.jms.JMSExceptionpublic void sendExchangeDeclare(AMQShortString name, AMQShortString type, boolean nowait, boolean durable, boolean autoDelete, boolean internal) throws AMQException, FailoverException
sendExchangeDeclare in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>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_10,BasicMessageProducer_0_10>AMQExceptionFailoverExceptionpublic void sendExchangeDeclare(String name, String type, String alternateExchange, Map<String,Object> args, boolean nowait, boolean durable, boolean autoDelete) throws AMQException
AMQExceptionpublic void sendExchangeDelete(String name, boolean nowait) throws AMQException, FailoverException
AMQExceptionFailoverExceptionpublic AMQShortString send0_10QueueDeclare(AMQDestination amqd, boolean noLocal, boolean nowait, boolean passive) throws AMQException
AMQExceptionpublic void sendQueueDelete(AMQShortString queueName) throws AMQException, FailoverException
sendQueueDelete in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>AMQExceptionFailoverExceptionpublic void sendSuspendChannel(boolean suspend)
throws AMQException,
FailoverException
sendSuspendChannel in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>AMQExceptionFailoverExceptionpublic void sendRollback()
throws AMQException,
FailoverException
sendRollback in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>AMQExceptionFailoverExceptionprotected Session getQpidSession()
public AMQException getCurrentException()
SessionException - get the latest thrown error.public void opened(Session ssn)
opened in interface SessionListenerpublic void resumed(Session ssn)
resumed in interface SessionListenerpublic void message(Session ssn, MessageTransfer xfr)
message in interface SessionListenerpublic void exception(Session ssn, SessionException exc)
exception in interface SessionListenerpublic void closed(Session ssn)
closed in interface SessionListenerpublic AMQException getLastException()
getLastException in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>protected AMQShortString declareQueue(AMQDestination amqd, boolean noLocal, boolean nowait, boolean passive) throws AMQException
declareQueue in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>AMQExceptionprotected Long requestQueueDepth(AMQDestination amqd, boolean sync)
requestQueueDepth in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>protected void addDeliveredMessage(long id)
addDeliveredMessage in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>id - protected void sendTxCompletionsIfNecessary()
public void commitImpl()
throws AMQException,
FailoverException,
TransportException
commitImpl in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>AMQExceptionFailoverExceptionTransportExceptionprotected final boolean tagLE(long tag1,
long tag2)
tagLE in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>protected final boolean updateRollbackMark(long currentMark,
long deliveryTag)
updateRollbackMark in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>public void sync()
throws AMQException
sync in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>AMQExceptionpublic void setCurrentException(SessionException se)
public AMQMessageDelegateFactory getMessageDelegateFactory()
getMessageDelegateFactory in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>public boolean isExchangeExist(AMQDestination dest, boolean assertNode) throws AMQException
isExchangeExist in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>AMQExceptionpublic boolean isQueueExist(AMQDestination dest, boolean assertNode) throws AMQException
isQueueExist in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>AMQExceptionpublic boolean isQueueExist(String queueName, boolean assertNode, boolean durable, boolean autoDelete, boolean exclusive, Map<String,Object> args) throws AMQException
AMQExceptionpublic int resolveAddressType(AMQDestination dest) throws AMQException
resolveAddressType in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>AMQExceptionprotected void acknowledgeImpl()
acknowledgeImpl in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>public boolean isFlowBlocked()
AMQSessionisFlowBlocked in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>public void setFlowControl(boolean active)
setFlowControl in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>protected void handleQueueNodeCreation(AMQDestination dest, boolean noLocal) throws AMQException
handleQueueNodeCreation in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>AMQExceptionprotected void doBind(AMQDestination dest, AMQDestination.Binding binding, String queue, String exchange)
doBind in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>Copyright © 2006–2014 The Apache Software Foundation. All rights reserved.