Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

jackbot
Class IRCMessageQueue  view IRCMessageQueue download IRCMessageQueue.java

java.lang.Object
  extended byjackbot.IRCMessageQueue

public final class IRCMessageQueue
extends java.lang.Object

A queue of IRCMessage objects. This class is not synchronized, and should be manually synchronized for multi-threaded operations.

Version:
$Revision: 1.2 $ $Date: 2002/09/27 01:59:43 $ since v.1a

Field Summary
private static IRCMessage IDLE_MESSAGE
           
private  java.util.LinkedList queue
          The linked list on top of which the queue is built.
 
Constructor Summary
IRCMessageQueue()
          Creates an empty IRCMessageQueue.
 
Method Summary
 IRCMessage get()
          Gets a message from the front of the queue.
 IRCMessage peek()
          Gets a message from the front of the queue.
 void put(IRCMessage message)
          Adds an item to the end of the queue.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IDLE_MESSAGE

private static IRCMessage IDLE_MESSAGE

queue

private java.util.LinkedList queue
The linked list on top of which the queue is built.

Constructor Detail

IRCMessageQueue

public IRCMessageQueue()
Creates an empty IRCMessageQueue.

Method Detail

put

public void put(IRCMessage message)
Adds an item to the end of the queue.


get

public IRCMessage get()
Gets a message from the front of the queue. This will actually remove the item from the queue.


peek

public IRCMessage peek()
Gets a message from the front of the queue. This will not remove the item from the queue.