## org.beepcore.beep.lib
Class MessageQueue

    java.lang.Object
      org.beepcore.beep.lib.MessageQueue

All Implemented Interfaces:
  MessageListener

public class MessageQueue
extends java.lang.Object
implements MessageListener

Is a convience class that is registered with a `Channel` as a `MessageListener`. This receives messages and places them on a queue to be retrieved by calling `getNextMessage`. The same instance of `MessageQueue` can be registered with more than one `Channel` providing an easy mechanism to service the requests on several `Channel`s with the same thread(s).

Constructor Summary
`MessageQueue()`

Method Summary
`Message` `getNextMessage()` Gets the next message on the queue blocking if none are available.
`void` `receiveMSG(Message message)` Receives a BEEP message of type MSG.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MessageQueue

    public MessageQueue()

Method Detail

### getNextMessage

    public Message getNextMessage()
                           throws java.lang.InterruptedException

  Gets the next message on the queue blocking if none are available.

  Throws:
    `java.lang.InterruptedException`

### receiveMSG

    public void receiveMSG(Message message)

  Description copied from interface: `MessageListener`
  Receives a BEEP message of type MSG.

  Specified by:
    `receiveMSG` in interface `MessageListener`
  Parameters:
    `message` - `Message`
  See Also:
    `org.beepcore.beep.core.Message`

Copyright ? 2001 Invisible Worlds, Inc. All Rights Reserved.