|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.qpid.server.AMQChannel
public class AMQChannel
Field Summary | |
---|---|
protected Map<org.apache.qpid.framing.AMQShortString,Subscription> |
_tag2SubscriptionMap
Maps from consumer tag to subscription instance. |
static int |
DEFAULT_PREFETCH
|
Constructor Summary | |
---|---|
AMQChannel(AMQProtocolSession session,
int channelId,
MessageStore messageStore)
|
Method Summary | |
---|---|
void |
acknowledgeMessage(long deliveryTag,
boolean multiple)
Acknowledge one or more messages. |
void |
addUnacknowledgedMessage(QueueEntry entry,
long deliveryTag,
Subscription subscription)
Add a message to the channel-based list of unacknowledged messages |
void |
block(AMQQueue queue)
|
void |
close()
Called from the protocol session to close this channel and clean up. |
void |
commit()
|
String |
debugIdentity()
|
boolean |
getBlocking()
|
int |
getChannel()
|
int |
getChannelId()
|
ClientDeliveryMethod |
getClientDeliveryMethod()
|
String |
getClientID()
|
ConfigStore |
getConfigStore()
|
SessionConfigType |
getConfigType()
|
ConnectionConfig |
getConnectionConfig()
|
AMQConnectionModel |
getConnectionModel()
|
long |
getCreateTime()
|
FlowCreditManager |
getCreditManager()
|
AMQQueue |
getDefaultQueue()
|
long |
getDetachedLifespan()
|
Long |
getExpiryTime()
|
UUID |
getId()
|
Object |
getID()
|
LogActor |
getLogActor()
|
LogSubject |
getLogSubject()
|
Long |
getMaxClientRate()
|
MessageStore |
getMessageStore()
|
int |
getNextConsumerTag()
|
long |
getNextDeliveryTag()
|
ConfiguredObject |
getParent()
|
AMQProtocolSession |
getProtocolSession()
|
RecordDeliveryMethod |
getRecordDeliveryMethod()
|
String |
getSessionName()
|
Subscription |
getSubscription(org.apache.qpid.framing.AMQShortString subscription)
|
Long |
getTxnCommits()
|
Long |
getTxnCount()
|
Long |
getTxnRejects()
|
Long |
getTxnStarts()
|
UnacknowledgedMessageMap |
getUnacknowledgedMessageMap()
Used only for testing purposes. |
VirtualHost |
getVirtualHost()
|
boolean |
isAttached()
|
boolean |
isClosing()
|
boolean |
isDurable()
|
boolean |
isSuspended()
|
boolean |
isTransactional()
|
void |
mgmtClose()
|
void |
publishContentBody(org.apache.qpid.framing.ContentBody contentBody)
|
void |
publishContentHeader(org.apache.qpid.framing.ContentHeaderBody contentHeaderBody)
|
void |
requeue()
Called to attempt re-delivery all outstanding unacknowledged messages on the channel. |
void |
requeue(long deliveryTag)
Requeue a single message |
void |
resend(boolean requeue)
Called to resend all outstanding unacknowledged messages to this same channel. |
void |
rollback()
|
void |
rollback(Runnable postRollbackTask)
|
protected void |
routeCurrentMessage()
|
void |
setCredit(long prefetchSize,
int prefetchCount)
|
void |
setDefaultQueue(AMQQueue queue)
|
void |
setLocalTransactional()
Sets this channel to be part of a local transaction |
void |
setPublishFrame(org.apache.qpid.framing.abstraction.MessagePublishInfo info,
Exchange e)
|
void |
setSuspended(boolean suspended)
Called from the ChannelFlowHandler to suspend this Channel |
org.apache.qpid.framing.AMQShortString |
subscribeToQueue(org.apache.qpid.framing.AMQShortString tag,
AMQQueue queue,
boolean acks,
org.apache.qpid.framing.FieldTable filters,
boolean noLocal,
boolean exclusive)
Subscribe to a queue. |
String |
toString()
|
void |
unblock(AMQQueue queue)
|
boolean |
unsubscribeConsumer(org.apache.qpid.framing.AMQShortString consumerTag)
Unsubscribe a consumer from a queue. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_PREFETCH
protected final Map<org.apache.qpid.framing.AMQShortString,Subscription> _tag2SubscriptionMap
Constructor Detail |
---|
public AMQChannel(AMQProtocolSession session, int channelId, MessageStore messageStore) throws org.apache.qpid.AMQException
org.apache.qpid.AMQException
Method Detail |
---|
public ConfigStore getConfigStore()
public void setLocalTransactional()
public boolean isTransactional()
isTransactional
in interface SessionConfig
public Long getTxnStarts()
getTxnStarts
in interface SessionConfig
public Long getTxnCommits()
getTxnCommits
in interface SessionConfig
public Long getTxnRejects()
getTxnRejects
in interface SessionConfig
public Long getTxnCount()
getTxnCount
in interface SessionConfig
public int getChannelId()
public void setPublishFrame(org.apache.qpid.framing.abstraction.MessagePublishInfo info, Exchange e) throws org.apache.qpid.AMQSecurityException
org.apache.qpid.AMQSecurityException
public void publishContentHeader(org.apache.qpid.framing.ContentHeaderBody contentHeaderBody) throws org.apache.qpid.AMQException
org.apache.qpid.AMQException
public void publishContentBody(org.apache.qpid.framing.ContentBody contentBody) throws org.apache.qpid.AMQException
org.apache.qpid.AMQException
protected void routeCurrentMessage() throws org.apache.qpid.AMQException
org.apache.qpid.AMQException
public long getNextDeliveryTag()
public int getNextConsumerTag()
public Subscription getSubscription(org.apache.qpid.framing.AMQShortString subscription)
public org.apache.qpid.framing.AMQShortString subscribeToQueue(org.apache.qpid.framing.AMQShortString tag, AMQQueue queue, boolean acks, org.apache.qpid.framing.FieldTable filters, boolean noLocal, boolean exclusive) throws org.apache.qpid.AMQException
tag
- the tag chosen by the client (if null, server will generate one)queue
- the queue to subscribe toacks
- Are acks enabled for this subscriberfilters
- Filters to apply to this subscribernoLocal
- Flag stopping own messages being receivied.exclusive
- Flag requesting exclusive access to the queue
org.apache.qpid.AMQException
- if something goes wrongpublic boolean unsubscribeConsumer(org.apache.qpid.framing.AMQShortString consumerTag) throws org.apache.qpid.AMQException
consumerTag
-
org.apache.qpid.AMQException
public void close() throws org.apache.qpid.AMQException
org.apache.qpid.AMQException
- if there is an error during closurepublic void addUnacknowledgedMessage(QueueEntry entry, long deliveryTag, Subscription subscription)
entry
- the record of the message on the queue that was delivereddeliveryTag
- the delivery tag used when delivering the message (see protocol spec for description of the
delivery tag)subscription
- The consumer that is to acknowledge this message.public String debugIdentity()
public void requeue() throws org.apache.qpid.AMQException
org.apache.qpid.AMQException
- if the requeue failspublic void requeue(long deliveryTag) throws org.apache.qpid.AMQException
deliveryTag
- The message to requeue
org.apache.qpid.AMQException
- If something goes wrong.public void resend(boolean requeue) throws org.apache.qpid.AMQException
requeue
- Are the messages to be requeued or dropped.
org.apache.qpid.AMQException
- When something goes wrong.public void acknowledgeMessage(long deliveryTag, boolean multiple) throws org.apache.qpid.AMQException
deliveryTag
- the last delivery tagmultiple
- if true will acknowledge all messages up to an including the delivery tag. if false only
acknowledges the single message specified by the delivery tag
org.apache.qpid.AMQException
- if the delivery tag is unknown (e.g. not outstanding) on this channelpublic UnacknowledgedMessageMap getUnacknowledgedMessageMap()
public void setSuspended(boolean suspended)
suspended
- boolean, should this Channel be suspendedpublic boolean isSuspended()
public void commit() throws org.apache.qpid.AMQException
org.apache.qpid.AMQException
public void rollback() throws org.apache.qpid.AMQException
org.apache.qpid.AMQException
public void rollback(Runnable postRollbackTask) throws org.apache.qpid.AMQException
org.apache.qpid.AMQException
public String toString()
toString
in class Object
public void setDefaultQueue(AMQQueue queue)
public AMQQueue getDefaultQueue()
public boolean isClosing()
public AMQProtocolSession getProtocolSession()
public FlowCreditManager getCreditManager()
public void setCredit(long prefetchSize, int prefetchCount)
public MessageStore getMessageStore()
public ClientDeliveryMethod getClientDeliveryMethod()
public RecordDeliveryMethod getRecordDeliveryMethod()
public Object getID()
getID
in interface AMQSessionModel
public AMQConnectionModel getConnectionModel()
getConnectionModel
in interface AMQSessionModel
public String getClientID()
getClientID
in interface AMQSessionModel
public LogSubject getLogSubject()
getLogSubject
in interface AMQSessionModel
public LogActor getLogActor()
public void block(AMQQueue queue)
public void unblock(AMQQueue queue)
public boolean getBlocking()
public VirtualHost getVirtualHost()
getVirtualHost
in interface SessionConfig
public ConfiguredObject getParent()
getParent
in interface ConfiguredObject<SessionConfigType,SessionConfig>
public SessionConfigType getConfigType()
getConfigType
in interface ConfiguredObject<SessionConfigType,SessionConfig>
public int getChannel()
getChannel
in interface SessionConfig
public boolean isAttached()
isAttached
in interface SessionConfig
public long getDetachedLifespan()
getDetachedLifespan
in interface SessionConfig
public ConnectionConfig getConnectionConfig()
getConnectionConfig
in interface SessionConfig
public Long getExpiryTime()
getExpiryTime
in interface SessionConfig
public Long getMaxClientRate()
getMaxClientRate
in interface SessionConfig
public boolean isDurable()
isDurable
in interface ConfiguredObject<SessionConfigType,SessionConfig>
public UUID getId()
getId
in interface ConfiguredObject<SessionConfigType,SessionConfig>
public String getSessionName()
getSessionName
in interface SessionConfig
public long getCreateTime()
getCreateTime
in interface ConfiguredObject<SessionConfigType,SessionConfig>
public void mgmtClose() throws org.apache.qpid.AMQException
mgmtClose
in interface SessionConfig
org.apache.qpid.AMQException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |