org.ow2.jonas.lib.management.javaee
Class JSR77ManagementIdentifier<T>

java.lang.Object
  extended by org.ow2.jonas.lib.management.javaee.JSR77ManagementIdentifier<T>
Type Parameters:
T - Managed Type
All Implemented Interfaces:
JManagementIdentifier<T>
Direct Known Subclasses:
EARModuleIdentifier

public abstract class JSR77ManagementIdentifier<T>
extends Object
implements JManagementIdentifier<T>

Specialized JManagementIdentifier for JSR77 MBeans.

Author:
Guillaume Sauthier, Florent BENOIT

Constructor Summary
protected JSR77ManagementIdentifier()
          Empty default constructor.
 
Method Summary
 String getDomain()
           
protected static String getInheritedPropertiesAsString(ObjectName name)
           
protected  String getJ2EEServerString()
           
static org.ow2.util.log.Log getLogger()
           
protected static String getParentNameProperty(String parentObjectName)
           
 String getServerName()
           
 String getTypeName()
          
 String getTypeProperty()
          May differ if JSR77 MBean or "normal" MBean.
A JSR77 MBean has j2eeType=XX, but a "normal" MBean has type=YY.
 void setDomain(String domainName)
          Sets the domain for this identifier.
 void setServerName(String serverName)
          Sets the Server name for this identifier.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.ow2.jonas.jmx.JManagementIdentifier
getAdditionnalProperties, getNamePropertyValue, getTypeValue
 

Constructor Detail

JSR77ManagementIdentifier

protected JSR77ManagementIdentifier()
Empty default constructor.

Method Detail

getInheritedPropertiesAsString

protected static String getInheritedPropertiesAsString(ObjectName name)
Parameters:
name - base ObjectName
Returns:
Returns a String that contains "inherited" properties from parent's ObjectName

getParentNameProperty

protected static String getParentNameProperty(String parentObjectName)
Parameters:
parentObjectName - Parent ObjectName.
Returns:
Returns the couple j2eetype=name of the parent ObjectName.

getDomain

public String getDomain()
Specified by:
getDomain in interface JManagementIdentifier<T>
Returns:
Returns the JMX Domain name of the MBean.

setDomain

public void setDomain(String domainName)
Sets the domain for this identifier.

Specified by:
setDomain in interface JManagementIdentifier<T>
Parameters:
domainName - the JMX Domain name of the MBean.

getServerName

public String getServerName()
Specified by:
getServerName in interface JManagementIdentifier<T>
Returns:
the JMX Server name of the MBean.

setServerName

public void setServerName(String serverName)
Sets the Server name for this identifier.

Specified by:
setServerName in interface JManagementIdentifier<T>
Parameters:
serverName - the JMX Server name of this MBean.

getTypeName

public String getTypeName()

Specified by:
getTypeName in interface JManagementIdentifier<T>
Returns:
Returns the 'type' property name : j2eeType for JSR 77 and type for others.

getTypeProperty

public String getTypeProperty()
May differ if JSR77 MBean or "normal" MBean.
A JSR77 MBean has j2eeType=XX, but a "normal" MBean has type=YY. Will probably be implemented by an abstract class.

Specified by:
getTypeProperty in interface JManagementIdentifier<T>
Returns:
Returns the type=type_name couple.

getLogger

public static final org.ow2.util.log.Log getLogger()
Returns:
the logger

getJ2EEServerString

protected String getJ2EEServerString()
Returns:
the String for J2EEServer.


Copyright © 2010 OW2 Consortium. All Rights Reserved.