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.2 $

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
`java.util.List` | `getContents()` Retrieve a shallow copy of the contents as a list
`java.lang.String` | `getName()`
`boolean` | `isEmpty()`
`boolean` | `isStarted()`
`int` | `size()`
`void` | `start()` enable dequeueing
`void` | `stop()` disable dequeueing

Method Detail

### getName

    public java.lang.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 java.lang.InterruptedException,
                        JMSException

  Enqueue a Packet to this queue

  Parameters:
    `packet` -
  Throws:
    `java.lang.InterruptedException`
    `JMSException`

### dequeue

    public Packet dequeue()
                   throws java.lang.InterruptedException,
                          JMSException

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

### dequeue

    public Packet dequeue(long timeInMillis)
                   throws java.lang.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:
    `java.lang.InterruptedException`
    `JMSException`

### dequeueNoWait

    public Packet dequeueNoWait()
                         throws java.lang.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:
    `java.lang.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 java.util.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.