nl.tudelft.simulation.messaging.queues
Interface MessageQueueInterface
- All Superinterfaces:
- java.io.Serializable
- All Known Implementing Classes:
- MessageQueue
- public interface MessageQueueInterface
- extends java.io.Serializable
The MessageQueueInterface gives the possibility to store and retrieve
messages, according to different types of sorting mechanisms. Examples are
FIFO and LIFO mechanisms.
Copyright (c) 2003-2005 Delft University of Technology, Jaffalaan 5, 2628 BX
Delft, the Netherlands. All rights reserved.
See for project information
www.simulation.tudelft.nl .
The source code and binary code of this software is proprietary information
of Delft University of Technology.
- Version:
- $$Revision: 1.2 $$ $$Date: 2005/04/08 10:56:35 $$
- Author:
- Peter
Jacobs , Stijn-Pieter van Houten
, Alexander
Verbraeck
add
public void add(Message message)
- Parameters:
message - new message to add
remove
public void remove(Message message)
- Parameters:
message - message to remove
first
public Message first()
- Returns:
- the first message according to the sorting mechanism
removeFirst
public Message removeFirst()
- Returns:
- the first message removed according to the sorting mechanism
size
public int size()
- Returns:
- the number of messages in the queue
isEmpty
public boolean isEmpty()
- Returns:
- whether the queue is empty or not
Copyright © 2004-2005 Delft University of Technology, the Netherlands. All Rights Reserved.