public class AgentId extends Object implements IAgentId
UID and IP of the host.| Modifier and Type | Field and Description |
|---|---|
static String |
AGENT_NAME_DEPENDENCY |
static String |
NO_NAME |
protected static Random |
random |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
long[] |
getIds() |
cz.cuni.amis.utils.flag.Flag<String> |
getName()
Contains a human-readable name of the agent.
|
String |
getToken()
Must return token that is unique even across different JVMs.
|
int |
hashCode() |
String |
toString() |
public static final String AGENT_NAME_DEPENDENCY
protected static Random random
public static final String NO_NAME
public AgentId()
@Inject public AgentId(String agentName)
public cz.cuni.amis.utils.flag.Flag<String> getName()
IAgentId
Note that the name is quite different string than IAgentId.getToken(). The
token contains unique-identifier of the agent across whole JVMs in the world, but
the name is just human-readable identifier that can be even changed over time.
Therefore, the name should not be used for any compares or interpretation.
public long[] getIds()
getIds in interface cz.cuni.amis.utils.token.ITokenpublic String getToken()
IAgentIdCopyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.