org.jboss.messaging.core.distributed.queue
Class DistributedQueue

java.lang.Object
  extended byorg.jboss.messaging.core.ChannelSupport
      extended byorg.jboss.messaging.core.local.Queue
          extended byorg.jboss.messaging.core.distributed.queue.DistributedQueue
All Implemented Interfaces:
Channel, CoreDestination, DeliveryObserver, Distributed, Distributor, Receiver

public class DistributedQueue
extends Queue
implements Distributed

A distributed queue.

Version:
$Revision: 1019 $ $Id: DistributedQueue.java 1019 2006-07-17 17:15:04Z timfox $
Author:
Ovidiu Feodorov

Field Summary
protected  QueuePeer peer
           
protected  ViewKeeper viewKeeper
           
 
Fields inherited from class org.jboss.messaging.core.ChannelSupport
acceptReliableMessages, channelID, deliveries, downCache, executor, messageOrdering, messageRefs, mm, ms, paging, pm, receiversReady, recoverable, refsInStorage, router
 
Constructor Summary
DistributedQueue(java.lang.String name, MessageStore ms, PersistenceManager tl, RpcDispatcher dispatcher)
          A recoverable queue peer.
DistributedQueue(java.lang.String name, MessageStore ms, RpcDispatcher dispatcher)
          An non-recoverable queue peer.
 
Method Summary
 java.util.List browse(Filter f)
           
 void close()
          Close the channel
 void deliver()
           
 Peer getPeer()
           
protected  ViewKeeper getViewKeeper()
           
 java.util.Iterator iterator()
           
 void join()
          Connects this peer to the distributed destination.
 void leave()
          Stops this peer and disconnects it from the distributed destination.
 java.util.List localBrowse(Filter filter)
           
protected  void processMessageBeforeStorage(MessageReference ref)
          Give subclass a chance to process the message before storing it internally.
 java.lang.String toString()
           
 
Methods inherited from class org.jboss.messaging.core.local.Queue
getDownCacheSize, getFullSize, getId, getMessageCount, getPageSize, isQueue
 
Methods inherited from class org.jboss.messaging.core.ChannelSupport
acceptReliableMessages, acknowledge, acknowledgeInMemory, acknowledgeInternal, add, addReferenceInMemory, addToDownCache, browse, cancel, cancelInternal, checkMemory, clear, contains, deliver, delivering, deliverInternal, downCacheCount, flushDownCache, getCallback, getChannelID, handle, handleInternal, isPaging, isRecoverable, load, load, memoryDeliveryCount, memoryRefCount, messageCount, obtainReference, remove, removeAllReferences, removeFirstInMemory, undelivered
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jboss.messaging.core.Distributor
add, clear, contains, remove
 
Methods inherited from interface org.jboss.messaging.core.Receiver
handle
 

Field Detail

peer

protected QueuePeer peer

viewKeeper

protected ViewKeeper viewKeeper
Constructor Detail

DistributedQueue

public DistributedQueue(java.lang.String name,
                        MessageStore ms,
                        RpcDispatcher dispatcher)
An non-recoverable queue peer.


DistributedQueue

public DistributedQueue(java.lang.String name,
                        MessageStore ms,
                        PersistenceManager tl,
                        RpcDispatcher dispatcher)
A recoverable queue peer.

Method Detail

iterator

public java.util.Iterator iterator()
Specified by:
iterator in interface Distributor
Overrides:
iterator in class ChannelSupport

browse

public java.util.List browse(Filter f)
Specified by:
browse in interface Channel
Overrides:
browse in class ChannelSupport

deliver

public void deliver()

close

public void close()
Description copied from interface: Channel
Close the channel

Specified by:
close in interface Distributed
Overrides:
close in class ChannelSupport

join

public void join()
          throws DistributedException
Description copied from interface: Distributed
Connects this peer to the distributed destination.

Specified by:
join in interface Distributed
Throws:
DistributedException - - a wrapper for exceptions thrown by the distributed layer.

leave

public void leave()
           throws DistributedException
Description copied from interface: Distributed
Stops this peer and disconnects it from the distributed destination.

Specified by:
leave in interface Distributed
Throws:
DistributedException - - a wrapper for exceptions thrown by the distributed layer.

getPeer

public Peer getPeer()
Specified by:
getPeer in interface Distributed

localBrowse

public java.util.List localBrowse(Filter filter)

toString

public java.lang.String toString()
Overrides:
toString in class Queue

processMessageBeforeStorage

protected void processMessageBeforeStorage(MessageReference ref)
Description copied from class: ChannelSupport
Give subclass a chance to process the message before storing it internally. Useful to get rid of the REMOTE_ROUTABLE header in a distributed case, for example.

Overrides:
processMessageBeforeStorage in class ChannelSupport

getViewKeeper

protected ViewKeeper getViewKeeper()


Copyright © 2006 JBoss Inc. All Rights Reserved.