1 package cz.cuni.amis.pogamut.base.agent;
2
3 import java.io.Serializable;
4
5 import javax.management.MXBean;
6
7 import cz.cuni.amis.utils.flag.Flag;
8 import cz.cuni.amis.utils.token.IToken;
9
10 /**
11 * Extension of the {@link IToken}, it provides an ability to give an agent a human-readable
12 * name.
13 * <p><p>
14 * Serializable! Implementors must behave accordingly.
15 *
16 * @author Jimmy
17 */
18 @MXBean
19 public interface IAgentId extends IToken, Serializable {
20
21 /**
22 * Contains a human-readable name of the agent.
23 * <p><p>
24 * Note that the name is quite different string than {@link IAgentId#getToken()}. The
25 * token contains unique-identifier of the agent across whole JVMs in the world, but
26 * the name is just human-readable identifier that can be even changed over time.
27 * <p><p>
28 * Therefore, the name should not be used for any compares or interpretation.
29 *
30 * @return
31 */
32 public Flag<String> getName();
33
34 /**
35 * Must return token that is unique even across different JVMs.
36 * @return token
37 */
38 @Override
39 public String getToken();
40
41 }