BoundedPacketQueue (ActiveMQ 1.1 API)
Keywords: org.codehaus.activemq.message.util.BoundedPacketQueue interface

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.codehaus.activemq.message.util
Interface BoundedPacketQueue

All Known Implementing Classes:
  MemoryBoundedQueue, SpooledBoundedPacketQueue

public interface BoundedPacketQueue

BoundedPacketQueue

Version:
  $Revision: 1.3 $

Method Summary
`void` | `clear()` clear the contents from the Queue
`void` | `close()` close and remove this queue
`Packet` | `dequeue()`
`Packet` | `dequeue(long timeInMillis)` Dequeues a Packet from the head of the queue
`Packet` | `dequeueNoWait()` dequeues a Packet from the head of the queue
`void` | `enqueue(Packet packet)` Enqueue a Packet to this queue
`void` | `enqueueNoBlock(Packet packet)` Enqueue a Packet without checking usage limits
`List` | `getContents()` Retrieve a shallow copy of the contents as a list
`String` | `getName()`
`boolean` | `isEmpty()`
`boolean` | `isStarted()`
`int` | `size()`
`void` | `start()` enable dequeueing
`void` | `stop()` disable dequeueing

Method Detail

### getName

    public String getName()

  Returns:
    the name of this queue

### size

    public int size()

  Returns:
    the number of items held by this queue

### close

    public void close()

  close and remove this queue

### enqueueNoBlock

    public void enqueueNoBlock(Packet packet)
                        throws JMSException

  Enqueue a Packet without checking usage limits

  Parameters:
    `packet` -
  Throws:
    `JMSException`

### enqueue

    public void enqueue(Packet packet)
                 throws InterruptedException,
                        JMSException

  Enqueue a Packet to this queue

  Parameters:
    `packet` -
  Throws:
    `InterruptedException`
    `JMSException`

### dequeue

    public Packet dequeue()
                   throws InterruptedException,
                          JMSException

  Returns:
    the first dequeued Packet or blocks until one is available
  Throws:
    `InterruptedException`
    `JMSException`

### dequeue

    public Packet dequeue(long timeInMillis)
                   throws InterruptedException,
                          JMSException

  Dequeues a Packet from the head of the queue

  Parameters:
    `timeInMillis` - time to wait for a Packet to be available
  Returns:
    the first Packet or null if none available within timeInMillis
  Throws:
    `InterruptedException`
    `JMSException`

### dequeueNoWait

    public Packet dequeueNoWait()
                         throws InterruptedException,
                                JMSException

  dequeues a Packet from the head of the queue

  Returns:
    the Packet at the head of the queue or null, if none is available
  Throws:
    `InterruptedException`
    `JMSException`

### isStarted

    public boolean isStarted()

  Returns:
    true if the queue is enabled for dequeing (default = true)

### stop

    public void stop()

  disable dequeueing

### start

    public void start()

  enable dequeueing

### isEmpty

    public boolean isEmpty()

  Returns:
    true if the queue is empty

### clear

    public void clear()

  clear the contents from the Queue

### getContents

    public List getContents()

  Retrieve a shallow copy of the contents as a list

  Returns:
    a list containing the bounded queue contents

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 © 2004 Protique, Ltd.. All Rights Reserved.