cz.cuni.amis.pogamut.base.agent.jmx.proxy
Class AgentIdJMXProxy

java.lang.Object
  extended by cz.cuni.amis.pogamut.base.agent.jmx.proxy.AgentIdJMXProxy
All Implemented Interfaces:
IAgentId, IToken, java.io.Serializable

public class AgentIdJMXProxy
extends java.lang.Object
implements IAgentId

Makes it possible to control agent running in remote JVM through JMX protocol.

See Also:
Serialized Form

Constructor Summary
AgentIdJMXProxy(AgentJMXProxy agentProxy)
           
 
Method Summary
 long[] getIds()
           
 Flag<java.lang.String> getName()
          Contains a human-readable name of the agent.
 java.lang.String getToken()
          Must return token that is unique even across different JVMs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AgentIdJMXProxy

public AgentIdJMXProxy(AgentJMXProxy agentProxy)
                throws java.net.MalformedURLException,
                       java.io.IOException,
                       javax.management.MalformedObjectNameException
Throws:
java.net.MalformedURLException
java.io.IOException
javax.management.MalformedObjectNameException
Method Detail

getName

public Flag<java.lang.String> getName()
Description copied from interface: IAgentId
Contains a human-readable name of the agent.

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.

Specified by:
getName in interface IAgentId
Returns:

getToken

public java.lang.String getToken()
Description copied from interface: IAgentId
Must return token that is unique even across different JVMs.

Specified by:
getToken in interface IAgentId
Specified by:
getToken in interface IToken
Returns:
token

getIds

public long[] getIds()
Specified by:
getIds in interface IToken