1
2
3
4
5
6
7
8
9
10 package nl.tudelft.simulation.dsol.formalisms.flow;
11
12 import java.rmi.RemoteException;
13
14 import nl.tudelft.simulation.event.EventProducerInterface;
15 import nl.tudelft.simulation.event.EventType;
16
17 /***
18 * A station is an object which accepts other objects and is linked to a
19 * destination.
20 * <p>
21 * (c) copyright 2003 <a href="http://www.simulation.tudelft.nl">Delft
22 * University of Technology </a>, the Netherlands. <br>
23 * See for project information <a href="http://www.simulation.tudelft.nl">
24 * www.simulation.tudelft.nl </a> <br>
25 * License of use: <a href="http://www.gnu.org/copyleft/gpl.html">General Public
26 * License (GPL) </a>, no warranty <br>
27 *
28 * @author <a href="http://www.simulation.tudelft.nl/people/jacobs.html">Peter
29 * Jacobs </a>
30 * @version 1.5 2004-03-26
31 * @since 1.0
32 */
33 public interface StationInterface extends EventProducerInterface
34 {
35 /*** RECEIVE_EVENT is fired whenever an entity enters the station */
36 EventType RECEIVE_EVENT = new EventType("RECEIVE_EVENT");
37
38 /*** RECEIVE_EVENT is fired whenever an entity leaves the station */
39 EventType RELEASE_EVENT = new EventType("RELEASE_EVENT");
40
41 /***
42 * Method getDestination.
43 *
44 * @return StationInterface is the destination of this station
45 * @throws RemoteException on network failure
46 */
47 StationInterface getDestination() throws RemoteException;
48
49 /***
50 * receives an object is invoked whenever an entity arrives
51 *
52 * @param object is the entity
53 * @throws RemoteException on network failure
54 */
55 void receiveObject(final Object object) throws RemoteException;
56
57 /***
58 * sets the destination of this object
59 *
60 * @param destination defines the next station in the model
61 * @throws RemoteException on network failure
62 */
63 void setDestination(final StationInterface destination)
64 throws RemoteException;
65 }