|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.qpid.client.Closeable
org.apache.qpid.client.AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>
org.apache.qpid.client.AMQSession_0_10
public class AMQSession_0_10
This is a 0.10 Session
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.qpid.client.AMQSession |
---|
AMQSession.Dispatchable, AMQSession.Dispatcher, AMQSession.IdToConsumerMap<C extends BasicMessageConsumer> |
Field Summary | |
---|---|
protected org.apache.qpid.transport.Connection |
_qpidConnection
|
Fields inherited from class org.apache.qpid.client.Closeable |
---|
_closed, _closing |
Fields inherited from interface org.apache.qpid.jms.Session |
---|
NO_ACKNOWLEDGE, PRE_ACKNOWLEDGE |
Fields inherited from interface javax.jms.Session |
---|
AUTO_ACKNOWLEDGE, CLIENT_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE, SESSION_TRANSACTED |
Constructor Summary | |
---|---|
AMQSession_0_10(org.apache.qpid.transport.Connection qpidConnection,
AMQConnection con,
int channelId,
boolean transacted,
int acknowledgeMode,
int defaultPrefetchHigh,
int defaultPrefetchLow)
Creates a new session on a connection with the default 0-10 message factory. |
|
AMQSession_0_10(org.apache.qpid.transport.Connection qpidConnection,
AMQConnection con,
int channelId,
boolean transacted,
int acknowledgeMode,
MessageFactoryRegistry messageFactoryRegistry,
int defaultPrefetchHighMark,
int defaultPrefetchLowMark)
Creates a new session on a connection. |
Method Summary | |
---|---|
void |
acknowledgeMessage(long deliveryTag,
boolean multiple)
Acknowledge one or many messages. |
protected void |
addDeliveredMessage(long id)
Store non committed messages for this session 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 |
closed(org.apache.qpid.transport.Session ssn)
|
void |
commit()
Commits all messages done in this transaction and releases any locks currently held. |
BasicMessageConsumer_0_10 |
createMessageConsumer(AMQDestination destination,
int prefetchHigh,
int prefetchLow,
boolean noLocal,
boolean exclusive,
String messageSelector,
org.apache.qpid.framing.FieldTable ft,
boolean noConsume,
boolean autoClose)
Create an 0_10 message consumer |
BasicMessageProducer_0_10 |
createMessageProducer(Destination destination,
boolean mandatory,
boolean immediate,
boolean waitUntilSent,
long producerId)
Create an 0_10 message producer |
protected org.apache.qpid.framing.AMQShortString |
declareQueue(AMQDestination amqd,
AMQProtocolHandler protocolHandler,
boolean noLocal,
boolean nowait)
|
void |
exception(org.apache.qpid.transport.Session ssn,
org.apache.qpid.transport.SessionException exc)
|
(package private) void |
failoverPrep()
|
protected void |
flushAcknowledgments()
|
(package private) void |
flushAcknowledgments(boolean setSyncBit)
|
org.apache.qpid.AMQException |
getCurrentException()
Get the latest thrown exception. |
AMQMessageDelegateFactory |
getMessageDelegateFactory()
|
protected org.apache.qpid.transport.Session |
getQpidSession()
Access to the underlying Qpid Session |
void |
handleAddressBasedDestination(AMQDestination dest,
boolean isConsumer,
boolean noWait)
1. |
boolean |
isExchangeExist(AMQDestination dest,
Node.ExchangeNode node,
boolean assertNode)
|
boolean |
isQueueBound(AMQDestination destination)
|
boolean |
isQueueBound(org.apache.qpid.framing.AMQShortString exchangeName,
org.apache.qpid.framing.AMQShortString queueName,
org.apache.qpid.framing.AMQShortString routingKey)
Bind a queue with an exchange. |
boolean |
isQueueBound(org.apache.qpid.framing.AMQShortString exchangeName,
org.apache.qpid.framing.AMQShortString queueName,
org.apache.qpid.framing.AMQShortString routingKey,
org.apache.qpid.framing.AMQShortString[] bindingKeys)
|
boolean |
isQueueBound(String exchangeName,
String queueName,
String bindingKey,
Map<String,Object> args)
|
boolean |
isQueueExist(AMQDestination dest,
Node.QueueNode node,
boolean assertNode)
|
void |
message(org.apache.qpid.transport.Session ssn,
org.apache.qpid.transport.MessageTransfer xfr)
|
(package private) void |
messageAcknowledge(org.apache.qpid.transport.RangeSet ranges,
boolean accept)
|
(package private) void |
messageAcknowledge(org.apache.qpid.transport.RangeSet ranges,
boolean accept,
boolean setSyncBit)
|
void |
opened(org.apache.qpid.transport.Session ssn)
|
void |
rejectMessage(long deliveryTag,
boolean requeue)
Release (0_8 notion of Reject) an acquired message |
void |
releaseForRollback()
|
protected Long |
requestQueueDepth(AMQDestination amqd)
|
int |
resolveAddressType(AMQDestination dest)
|
void |
resumed(org.apache.qpid.transport.Session ssn)
|
org.apache.qpid.framing.AMQShortString |
send0_10QueueDeclare(AMQDestination amqd,
AMQProtocolHandler protocolHandler,
boolean noLocal,
boolean nowait)
Declare a queue with the given queueName |
void |
sendClose(long timeout)
Close this session. |
void |
sendCommit()
Commit the receipt and the delivery of all messages exchanged by this session resources. |
void |
sendConsume(BasicMessageConsumer_0_10 consumer,
org.apache.qpid.framing.AMQShortString queueName,
AMQProtocolHandler protocolHandler,
boolean nowait,
String messageSelector,
int tag)
This method is invoked when a consumer is created Registers the consumer with the broker |
void |
sendCreateQueue(org.apache.qpid.framing.AMQShortString name,
boolean autoDelete,
boolean durable,
boolean exclusive,
Map<String,Object> arguments)
Create a queue with a given name. |
void |
sendExchangeDeclare(org.apache.qpid.framing.AMQShortString name,
org.apache.qpid.framing.AMQShortString type,
AMQProtocolHandler protocolHandler,
boolean nowait)
creates an exchange if it does not already exist |
void |
sendExchangeDeclare(String name,
String type,
String alternateExchange,
Map<String,Object> args,
boolean nowait)
|
void |
sendQueueBind(org.apache.qpid.framing.AMQShortString queueName,
org.apache.qpid.framing.AMQShortString routingKey,
org.apache.qpid.framing.FieldTable arguments,
org.apache.qpid.framing.AMQShortString exchangeName,
AMQDestination destination,
boolean nowait)
Bind a queue with an exchange. |
void |
sendQueueDeclare(AMQDestination amqd,
AMQProtocolHandler protocolHandler,
boolean nowait)
Declare a queue with the given queueName |
void |
sendQueueDelete(org.apache.qpid.framing.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. |
void |
setCurrentException(org.apache.qpid.transport.SessionException se)
|
void |
setLegacyFiledsForQueueType(AMQDestination dest)
|
void |
setLegacyFiledsForTopicType(AMQDestination dest)
|
void |
sync()
|
protected boolean |
tagLE(long tag1,
long tag2)
|
protected boolean |
updateRollbackMark(long currentMark,
long deliveryTag)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected org.apache.qpid.transport.Connection _qpidConnection
Constructor Detail |
---|
AMQSession_0_10(org.apache.qpid.transport.Connection qpidConnection, 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.qpidConnection
- The qpid connectionAMQSession_0_10(org.apache.qpid.transport.Connection qpidConnection, AMQConnection con, int channelId, boolean transacted, int acknowledgeMode, int defaultPrefetchHigh, int defaultPrefetchLow)
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.defaultPrefetchHigh
- The maximum number of messages to prefetched before suspending the session.defaultPrefetchLow
- The number of prefetched messages at which to resume the session.qpidConnection
- The connectionMethod Detail |
---|
void failoverPrep()
failoverPrep
in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>
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>
void flushAcknowledgments(boolean setSyncBit)
void messageAcknowledge(org.apache.qpid.transport.RangeSet ranges, boolean accept)
void messageAcknowledge(org.apache.qpid.transport.RangeSet ranges, boolean accept, boolean setSyncBit)
public void sendQueueBind(org.apache.qpid.framing.AMQShortString queueName, org.apache.qpid.framing.AMQShortString routingKey, org.apache.qpid.framing.FieldTable arguments, org.apache.qpid.framing.AMQShortString exchangeName, AMQDestination destination, boolean nowait) throws org.apache.qpid.AMQException, FailoverException
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 specific
org.apache.qpid.AMQException
FailoverException
public void sendClose(long timeout) throws org.apache.qpid.AMQException, FailoverException
sendClose
in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>
timeout
- no used / 0_8 specific
org.apache.qpid.AMQException
FailoverException
public void sendCommit() throws org.apache.qpid.AMQException, FailoverException
sendCommit
in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>
org.apache.qpid.AMQException
FailoverException
public void sendCreateQueue(org.apache.qpid.framing.AMQShortString name, boolean autoDelete, boolean durable, boolean exclusive, Map<String,Object> arguments) throws org.apache.qpid.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.
org.apache.qpid.AMQException
FailoverException
public void sendRecover() throws org.apache.qpid.AMQException, FailoverException
sendRecover
in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>
org.apache.qpid.AMQException
FailoverException
public 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, org.apache.qpid.framing.FieldTable ft, boolean noConsume, boolean autoClose) throws JMSException
createMessageConsumer
in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>
JMSException
public boolean isQueueBound(org.apache.qpid.framing.AMQShortString exchangeName, org.apache.qpid.framing.AMQShortString queueName, org.apache.qpid.framing.AMQShortString routingKey) throws JMSException
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.
JMSException
- If the query fails for any reason.public boolean isQueueBound(AMQDestination destination) throws JMSException
isQueueBound
in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>
JMSException
public boolean isQueueBound(org.apache.qpid.framing.AMQShortString exchangeName, org.apache.qpid.framing.AMQShortString queueName, org.apache.qpid.framing.AMQShortString routingKey, org.apache.qpid.framing.AMQShortString[] bindingKeys) throws JMSException
JMSException
public boolean isQueueBound(String exchangeName, String queueName, String bindingKey, Map<String,Object> args) throws JMSException
isQueueBound
in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>
JMSException
public void sendConsume(BasicMessageConsumer_0_10 consumer, org.apache.qpid.framing.AMQShortString queueName, AMQProtocolHandler protocolHandler, boolean nowait, String messageSelector, int tag) throws org.apache.qpid.AMQException, FailoverException
sendConsume
in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>
org.apache.qpid.AMQException
FailoverException
public BasicMessageProducer_0_10 createMessageProducer(Destination destination, boolean mandatory, boolean immediate, boolean waitUntilSent, long producerId)
createMessageProducer
in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>
public void sendExchangeDeclare(org.apache.qpid.framing.AMQShortString name, org.apache.qpid.framing.AMQShortString type, AMQProtocolHandler protocolHandler, boolean nowait) throws org.apache.qpid.AMQException, FailoverException
sendExchangeDeclare
in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>
org.apache.qpid.AMQException
FailoverException
public void sendExchangeDeclare(String name, String type, String alternateExchange, Map<String,Object> args, boolean nowait) throws org.apache.qpid.AMQException
org.apache.qpid.AMQException
public void sendQueueDeclare(AMQDestination amqd, AMQProtocolHandler protocolHandler, boolean nowait) throws org.apache.qpid.AMQException, FailoverException
sendQueueDeclare
in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>
org.apache.qpid.AMQException
FailoverException
public org.apache.qpid.framing.AMQShortString send0_10QueueDeclare(AMQDestination amqd, AMQProtocolHandler protocolHandler, boolean noLocal, boolean nowait) throws org.apache.qpid.AMQException
org.apache.qpid.AMQException
public void sendQueueDelete(org.apache.qpid.framing.AMQShortString queueName) throws org.apache.qpid.AMQException, FailoverException
sendQueueDelete
in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>
org.apache.qpid.AMQException
FailoverException
public void sendSuspendChannel(boolean suspend) throws org.apache.qpid.AMQException, FailoverException
sendSuspendChannel
in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>
org.apache.qpid.AMQException
FailoverException
public void sendRollback() throws org.apache.qpid.AMQException, FailoverException
sendRollback
in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>
org.apache.qpid.AMQException
FailoverException
protected org.apache.qpid.transport.Session getQpidSession()
public org.apache.qpid.AMQException getCurrentException()
org.apache.qpid.transport.SessionException
- get the latest thrown error.public void opened(org.apache.qpid.transport.Session ssn)
opened
in interface org.apache.qpid.transport.SessionListener
public void resumed(org.apache.qpid.transport.Session ssn)
resumed
in interface org.apache.qpid.transport.SessionListener
public void message(org.apache.qpid.transport.Session ssn, org.apache.qpid.transport.MessageTransfer xfr)
message
in interface org.apache.qpid.transport.SessionListener
public void exception(org.apache.qpid.transport.Session ssn, org.apache.qpid.transport.SessionException exc)
exception
in interface org.apache.qpid.transport.SessionListener
public void closed(org.apache.qpid.transport.Session ssn)
closed
in interface org.apache.qpid.transport.SessionListener
protected org.apache.qpid.framing.AMQShortString declareQueue(AMQDestination amqd, AMQProtocolHandler protocolHandler, boolean noLocal, boolean nowait) throws org.apache.qpid.AMQException
declareQueue
in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>
org.apache.qpid.AMQException
protected Long requestQueueDepth(AMQDestination amqd)
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
- public void commit() throws JMSException
AMQSession
commit
in interface Session
commit
in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>
JMSException
- If the JMS provider fails to commit the transaction due to some internal error. This does
not mean that the commit is known to have failed, merely that it is not known whether it
failed or not.protected 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 org.apache.qpid.AMQException
sync
in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>
org.apache.qpid.AMQException
public void setCurrentException(org.apache.qpid.transport.SessionException se)
public AMQMessageDelegateFactory getMessageDelegateFactory()
getMessageDelegateFactory
in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>
public boolean isExchangeExist(AMQDestination dest, Node.ExchangeNode node, boolean assertNode)
public boolean isQueueExist(AMQDestination dest, Node.QueueNode node, boolean assertNode)
public void handleAddressBasedDestination(AMQDestination dest, boolean isConsumer, boolean noWait) throws org.apache.qpid.AMQException
handleAddressBasedDestination
in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>
org.apache.qpid.AMQException
public int resolveAddressType(AMQDestination dest) throws org.apache.qpid.AMQException
org.apache.qpid.AMQException
public void setLegacyFiledsForQueueType(AMQDestination dest)
public void setLegacyFiledsForTopicType(AMQDestination dest)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |