org.jboss.mx.util
Class AgentID

java.lang.Object
  extended byorg.jboss.mx.util.AgentID
All Implemented Interfaces:
ServerConstants (src)

public class AgentID
extends java.lang.Object
implements ServerConstants (src)

Utility class for creating JMX agent identifiers. Also contains the helper method for retrieving the AgentID of an existing MBean server instance.

See Also:
MBeanServerDelegateMBean (src)

Field Summary
 
Fields inherited from interface org.jboss.mx.server.ServerConstants (src)
CLASS_REMOVED, CLASSLOADER, CLASSLOADER_ADDED, CLASSLOADER_REMOVED, DEFAULT_DOMAIN, DEFAULT_LOADER_NAME, DEFAULT_LOADER_REPOSITORY_CLASS, DEFAULT_MBEAN_REGISTRY_CLASS, DEFAULT_MBEAN_SERVER_BUILDER_CLASS, DEFAULT_REQUIRED_MODELMBEAN_CLASS, DEFAULT_SCOPED_REPOSITORY_CLASS, DEFAULT_SCOPED_REPOSITORY_PARSER_CLASS, IMPLEMENTATION_NAME, IMPLEMENTATION_VENDOR, IMPLEMENTATION_VERSION, JMI_DOMAIN, LOADER_REPOSITORY_CLASS_PROPERTY, MBEAN_REGISTRY, MBEAN_REGISTRY_CLASS_PROPERTY, MBEAN_SERVER_BUILDER_CLASS_PROPERTY, MBEAN_SERVER_CONFIGURATION, MBEAN_SERVER_DELEGATE, OPTIMIZE_REFLECTED_DISPATCHER, REQUIRED_MODELMBEAN_CLASS_PROPERTY, SPECIFICATION_NAME, SPECIFICATION_VENDOR, SPECIFICATION_VERSION, UNIFIED_LOADER_REPOSITORY_CLASS
 
Constructor Summary
AgentID()
           
 
Method Summary
static java.lang.String create()
          Creates a new agent ID string.
static java.lang.String get(MBeanServer (src)  server)
          Returns the agent identifier string of a given MBean server instance.
static void main(java.lang.String[] args)
          test
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AgentID

public AgentID()
Method Detail

create

public static java.lang.String create()
Creates a new agent ID string. The identifier is of the form <ip.address>/<creation time in ms>/<VMID+(random int 0-100)>/<sequence #>.

This AgentID string is globally unique.

Returns:
Agent ID string

main

public static void main(java.lang.String[] args)
test

Parameters:
args -

get

public static java.lang.String get(MBeanServer (src)  server)
Returns the agent identifier string of a given MBean server instance.

Returns:
MBeanServerId attribute of the MBean server delegate.