org.jboss.seam.jmx
Class AgentID

java.lang.Object
  extended by org.jboss.seam.jmx.AgentID
All Implemented Interfaces:
org.jboss.mx.server.ServerConstants

public class AgentID
extends Object
implements org.jboss.mx.server.ServerConstants

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

Version:
$Revision: 81019 $
Author:
Juha Lindfors.
See Also:
MBeanServerDelegateMBean

Field Summary
 
Fields inherited from interface org.jboss.mx.server.ServerConstants
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 String create()
          Creates a new agent ID string.
static String get(MBeanServer server)
          Returns the agent identifier string of a given MBean server instance.
static void main(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 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(String[] args)
test

Parameters:
args -

get

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

Returns:
MBeanServerId attribute of the MBean server delegate.


Copyright © 2011 Seam Framework. All Rights Reserved.