|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A Channel is a transactional, reliable message delivery mechanism that forwards a message from a sender to one or more receivers. The channel tries to deliver a message synchronously, if possible, and stores the message for re-delivery if synchronous delivery is not possible. A channel implementation may chose to be transactional, reliable or none of the above. A simple channel implementation may not able to accept messages/acknowledgments transactionally, and may not guarantee recoverability in case of failure. A transactional channel must be able to guarantee atomicity when accepting messages/acknowledgments. A reliable channel must be able to guarantee atomicity and recoverability in case of failure. However, recoverability is guaranteed only for reliable messages. For non-reliable message, the channel will do its best effort.
Method Summary | |
boolean |
acceptReliableMessages()
A non-recoverable channel cannot guarantee recoverability for reliable messages so by default it won't accept reliable messages. |
void |
activate()
|
java.util.List |
browse()
|
java.util.List |
browse(Filter filter)
|
void |
clear()
Clears non-recoverable state but not persisted state, so a recovery of the channel is possible TODO really? |
void |
close()
Close the channel |
void |
deactivate()
|
void |
deliver()
Delivers as many references as possible to its router until no more deliveries are returned. |
long |
getChannelID()
|
int |
getDeliveringCount()
|
int |
getMaxSize()
|
int |
getMessageCount()
|
int |
getMessagesAdded()
|
int |
getScheduledCount()
Count scheduled for delivery |
boolean |
isActive()
|
boolean |
isRecoverable()
|
void |
load()
|
java.util.List |
recoverDeliveries(java.util.List messageIds)
|
void |
removeAllReferences()
Remove all the references in the channel |
void |
setMaxSize(int newSize)
|
void |
unload()
|
Methods inherited from interface org.jboss.messaging.core.DeliveryObserver |
acknowledge, cancel |
Methods inherited from interface org.jboss.messaging.core.Distributor |
add, contains, getNumberOfReceivers, iterator, remove |
Methods inherited from interface org.jboss.messaging.core.Receiver |
handle |
Method Detail |
public long getChannelID()
public boolean isRecoverable()
public boolean acceptReliableMessages()
public java.util.List browse()
public java.util.List browse(Filter filter)
filter
- - may be null, in which case no filter is applied.
public void deliver()
public void close()
public void clear()
clear
in interface Distributor
public int getMessageCount()
public int getDeliveringCount()
public int getScheduledCount()
public void removeAllReferences() throws java.lang.Throwable
java.lang.Throwable
public void load() throws java.lang.Exception
java.lang.Exception
public void unload() throws java.lang.Exception
java.lang.Exception
public void activate()
public void deactivate()
public boolean isActive()
public java.util.List recoverDeliveries(java.util.List messageIds)
public int getMaxSize()
public void setMaxSize(int newSize)
public int getMessagesAdded()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |