Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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

    java.lang.Object
      org.jboss.messaging.core.ChannelSupport
          org.jboss.messaging.core.local.Queue
              org.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: 1.15 $` $Id: DistributedQueue.java,v 1.15 2006/06/27 19:44:39 timfox Exp $
Author:
  Ovidiu Feodorov

Field Summary
`protected QueuePeer` | `peer`
`protected ViewKeeper` | `viewKeeper`

Fields inherited from class org.jboss.messaging.core.ChannelSupport
`channelID, mm, ms, pm, router, state`

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()`
`boolean` | `deliver(Receiver r)` Synchronously pushes the "oldest" message stored by the channel to the receiver.
`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, load`

Methods inherited from class org.jboss.messaging.core.ChannelSupport
`acceptReliableMessages, acknowledge, add, browse, cancel, clear, contains, deliver, deliver, getChannelID, getMessageStore, handle, isRecoverable, obtainReference, remove, removeAllMessages`

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 boolean deliver(Receiver r)

  Description copied from interface: `Channel`
  Synchronously pushes the "oldest" message stored by the channel to the receiver. If receiver is null, it delivers the message to the first available receiver.

  Specified by:
    `deliver` in interface `Channel`
  Overrides:
    `deliver` in class `ChannelSupport`

### close

    public void close()

  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()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006 JBoss Inc. All Rights Reserved.