|
|||||||||
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 | |
---|---|
static int |
DEFAULT_PREFETCH
|
Constructor Summary | |
---|---|
AMQChannel(int channelId,
MessageStore messageStore,
MessageRouter exchanges)
|
Method Summary | |
---|---|
void |
acknowledgeMessage(long deliveryTag,
boolean multiple)
Acknowledge one or more messages. |
void |
addUnacknowledgedMessage(AMQMessage message,
long deliveryTag,
java.lang.String consumerTag,
AMQQueue queue)
Add a message to the channel-based list of unacknowledged messages |
void |
close(AMQProtocolSession session)
Called from the protocol session to close this channel and clean up. |
void |
commit()
|
int |
getChannelId()
|
AMQQueue |
getDefaultQueue()
|
int |
getNextConsumerTag()
|
long |
getNextDeliveryTag()
|
long |
getPrefetchCount()
|
long |
getPrefetchHighMarkCount()
|
long |
getPrefetchLowMarkCount()
|
java.util.Map<java.lang.Long,UnacknowledgedMessage> |
getUnacknowledgedMessageMap()
Used only for testing purposes. |
boolean |
isSuspended()
|
boolean |
isTransactional()
|
void |
processReturns(AMQProtocolSession session)
|
void |
publishContentBody(org.apache.qpid.framing.ContentBody contentBody)
|
void |
publishContentHeader(org.apache.qpid.framing.ContentHeaderBody contentHeaderBody)
|
void |
queueDeleted(AMQQueue queue)
Callback indicating that a queue has been deleted. |
void |
requeue()
Called to attempt re-enqueue all outstanding unacknowledged messages on the channel. |
void |
resend(AMQProtocolSession session)
Called to resend all outstanding unacknowledged messages to this same channel. |
void |
rollback()
|
protected void |
routeCurrentMessage()
|
void |
setDefaultQueue(AMQQueue queue)
|
void |
setPrefetchCount(long prefetchCount)
|
void |
setPrefetchHighMarkCount(long prefetchCount)
|
void |
setPrefetchLowMarkCount(long prefetchCount)
|
void |
setPublishFrame(org.apache.qpid.framing.BasicPublishBody publishBody,
AMQProtocolSession publisher)
|
void |
setSuspended(boolean suspended)
|
void |
setTransactional(boolean transactional)
|
java.lang.String |
subscribeToQueue(java.lang.String tag,
AMQQueue queue,
AMQProtocolSession session,
boolean acks)
Subscribe to a queue. |
java.lang.String |
toString()
|
void |
unsubscribeConsumer(AMQProtocolSession session,
java.lang.String consumerTag)
|
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
Constructor Detail |
---|
public AMQChannel(int channelId, MessageStore messageStore, MessageRouter exchanges) throws org.apache.qpid.AMQException
org.apache.qpid.AMQException
Method Detail |
---|
public int getChannelId()
public boolean isTransactional()
public void setTransactional(boolean transactional)
public long getPrefetchCount()
public void setPrefetchCount(long prefetchCount)
public long getPrefetchLowMarkCount()
public void setPrefetchLowMarkCount(long prefetchCount)
public long getPrefetchHighMarkCount()
public void setPrefetchHighMarkCount(long prefetchCount)
public void setPublishFrame(org.apache.qpid.framing.BasicPublishBody publishBody, AMQProtocolSession publisher) throws org.apache.qpid.AMQException
org.apache.qpid.AMQException
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 java.lang.String subscribeToQueue(java.lang.String tag, AMQQueue queue, AMQProtocolSession session, boolean acks) throws org.apache.qpid.AMQException, ConsumerTagNotUniqueException
tag
- the tag chosen by the client (if null, server will generate one)queue
- the queue to subscribe tosession
- the protocol session of the subscriber
ConsumerTagNotUniqueException
- if the tag is not unique
org.apache.qpid.AMQException
- if something goes wrongpublic void unsubscribeConsumer(AMQProtocolSession session, java.lang.String consumerTag) throws org.apache.qpid.AMQException
org.apache.qpid.AMQException
public void close(AMQProtocolSession session) throws org.apache.qpid.AMQException
org.apache.qpid.AMQException
- if there is an error during closurepublic void addUnacknowledgedMessage(AMQMessage message, long deliveryTag, java.lang.String consumerTag, AMQQueue queue)
message
- deliveryTag
- queue
- public void requeue() throws org.apache.qpid.AMQException
org.apache.qpid.AMQException
public void resend(AMQProtocolSession session)
public void queueDeleted(AMQQueue queue)
queue
- 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 java.util.Map<java.lang.Long,UnacknowledgedMessage> getUnacknowledgedMessageMap()
public void setSuspended(boolean suspended)
public 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 java.lang.String toString()
toString
in class java.lang.Object
public void setDefaultQueue(AMQQueue queue)
public AMQQueue getDefaultQueue()
public void processReturns(AMQProtocolSession session)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |