1
2
3
4
5
6
7
8
9
10
11
12
13
14 package nl.tudelft.simulation.yellowpage;
15
16 import java.rmi.RemoteException;
17
18 import nl.tudelft.simulation.actor.ActorInterface;
19
20 /***
21 * A YellowPageInterface, which enables finding of actors based on a registry in
22 * which actors can register themselves. <br>
23 * <br>
24 * Copyright (c) 2003-2005 Delft University of Technology, Jaffalaan 5, 2628 BX
25 * Delft, the Netherlands. All rights reserved.
26 *
27 * See for project information <a href="http://www.simulation.tudelft.nl/">
28 * www.simulation.tudelft.nl </a>.
29 *
30 * The source code and binary code of this software is proprietary information
31 * of Delft University of Technology.
32 *
33 * @author <a href="http://www.simulation.tudelft.nl/people/jacobs.html">Peter
34 * Jacobs </a>
35 * @version $$Revision: 1.2 $$ $$Date: 2005/04/08 10:56:36 $$
36 */
37 public interface YellowPageInterface
38 {
39 /***
40 * finds an actor based on the regex
41 *
42 * @param regex the name of the actor as regular expression
43 * @return ActorInterface[] the result
44 * @throws RemoteException on network failure
45 */
46 ActorInterface[] findActor(final String regex) throws RemoteException;
47
48 /***
49 * finds an actor based on the regex
50 *
51 * @param regex the name of the actor as regular expression
52 * @param category the category for this actor
53 * @return ActorInterface[] the result
54 * @throws RemoteException on network failure
55 */
56 ActorInterface[] findActor(final String regex, final Category category)
57 throws RemoteException;
58
59 /***
60 * finds an actor based on the category
61 *
62 * @param category the category for this actor
63 * @return ActorInterface[] the result
64 * @throws RemoteException on network failure
65 */
66 ActorInterface[] findActor(final Category category) throws RemoteException;
67
68 /***
69 * registers an actor
70 *
71 * @param actor the actor
72 * @param category the category
73 * @return succes
74 * @throws RemoteException on network failure
75 */
76 boolean register(final ActorInterface actor, final Category category)
77 throws RemoteException;
78 }