1
2
3
4
5
6
7
8
9
10
11
12
13
14 package nl.tudelft.simulation.actor.messagehandlers;
15
16 import java.io.Serializable;
17
18 import nl.tudelft.simulation.messaging.queues.MessageQueueInterface;
19
20 /***
21 * A MessageHandler that implements the MessageHandlerInterface should be able
22 * to take a MessageQueue from a device, and take one or more messages out of
23 * the queue, and prepare the messages fro further handling. <br>
24 * <br>
25 * Copyright (c) 2003-2005 Delft University of Technology, Jaffalaan 5, 2628 BX
26 * Delft, the Netherlands. All rights reserved.
27 *
28 * See for project information <a href="http://www.simulation.tudelft.nl/">
29 * www.simulation.tudelft.nl </a>.
30 *
31 * The source code and binary code of this software is proprietary information
32 * of Delft University of Technology.
33 *
34 * @author <a href="http://www.tbm.tudelft.nl/webstaf/peterja/index.htm">Peter
35 * Jacobs </a>, <a
36 * href="mailto:s.p.a.vanhouten@tbm.tudelft.nl">Stijn-Pieter van Houten
37 * </a>, <a
38 * href="http://www.tbm.tudelft.nl/webstaf/alexandv/index.htm">Alexander
39 * Verbraeck </a>
40 * @version $$Revision: 1.2 $$ $$Date: 2005/04/08 10:56:35 $$
41 */
42 public interface MessageHandlerInterface extends Serializable
43 {
44 /***
45 * Looks at a message queue, takes out the messages one by one, unpacks the
46 * message, and handles the content. This method can be extended to handle
47 * the messages differently, e.g. by just working on one message and then
48 * stopping, or taking time to handle the message (and blocking if needed)
49 *
50 * @param messageQueue the queue to look at
51 */
52 void handleMessageQueue(final MessageQueueInterface messageQueue);
53 }