1
2
3
4
5
6
7
8
9
10
11
12
13
14 package nl.tudelft.simulation.actor;
15
16 import java.io.Serializable;
17
18 import nl.tudelft.simulation.content.HandlerInterface;
19 import nl.tudelft.simulation.dsol.animation.LocatableInterface;
20 import nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface;
21 import nl.tudelft.simulation.messaging.Message;
22 import nl.tudelft.simulation.messaging.devices.components.ReceivingDeviceInterface;
23 import nl.tudelft.simulation.messaging.devices.components.SendingDeviceInterface;
24 import nl.tudelft.simulation.messaging.devices.types.DeviceType;
25
26 /***
27 * The ActorInterface defines what an Actor actually is: an locatable, named
28 * object that is able to communicate, and able to schedule events on a
29 * simulator. <br>
30 * <br>
31 * Copyright (c) 2003-2005 Delft University of Technology, Jaffalaan 5, 2628 BX
32 * Delft, the Netherlands. All rights reserved.
33 *
34 * See for project information <a href="http://www.simulation.tudelft.nl/">
35 * www.simulation.tudelft.nl </a>.
36 *
37 * The source code and binary code of this software is proprietary information
38 * of Delft University of Technology.
39 *
40 * @author <a href="http://www.tbm.tudelft.nl/webstaf/peterja/index.htm">Peter
41 * Jacobs </a>, <a
42 * href="mailto:s.p.a.vanhouten@tbm.tudelft.nl">Stijn-Pieter van Houten
43 * </a>, <a
44 * href="http://www.tbm.tudelft.nl/webstaf/alexandv/index.htm">Alexander
45 * Verbraeck </a>
46 * @version $$Revision: 1.2 $$ $$Date: 2005/04/08 10:56:36 $$
47 */
48 public interface ActorInterface extends LocatableInterface, HandlerInterface,
49 Serializable
50 {
51 /***
52 * Retrieve the sending devices of the actor.
53 *
54 * @param deviceType the devices to search for
55 * @return the devices with the given DeviceType
56 */
57 SendingDeviceInterface[] getSendingDevices(final DeviceType deviceType);
58
59 /***
60 * Retrieve all sending devices of the actor.
61 *
62 * @return all sending devices
63 */
64 SendingDeviceInterface[] getSendingDevices();
65
66 /***
67 * Retrieve the receiving devices of the actor.
68 *
69 * @param deviceType the devices to search for
70 * @return the devices with the given DeviceType
71 */
72 ReceivingDeviceInterface[] getReceivingDevices(final DeviceType deviceType);
73
74 /***
75 * Retrieve all receiving devices of the actor.
76 *
77 * @return all receiving devices
78 */
79 ReceivingDeviceInterface[] getReceivingDevices();
80
81 /***
82 * Get the name of the actor.
83 *
84 * @return the name of the actor
85 */
86 String getName();
87
88 /***
89 * Handles a message and returns an ackowledgement.
90 *
91 * @param message the message to be handled
92 * @return a boolean acknowledgement
93 */
94 boolean handleMessage(final Message message);
95
96 /***
97 * Get the simulator on which this actor schedules. This getSimulator method
98 * does <i>not </i> throw a RemoteException.
99 *
100 * @return Returns the simulator.
101 */
102 DEVSSimulatorInterface getSimulator();
103
104 /***
105 * Get the time of the simulator on which this actor schedules. This
106 * getSimulatorTime method does <i>not </i> throw a RemoteException.
107 *
108 * @return Returns the simulator time.
109 */
110 double getSimulatorTime();
111 }