BEA Systems, Inc.

WebLogic Server 8.1 API Reference

weblogic.management
Class WebLogicObjectName

java.lang.Object
  |
  +--javax.management.ObjectName
        |
        +--weblogic.management.WebLogicObjectName

public final class WebLogicObjectName
extends javax.management.ObjectName

The WebLogic Server Management API distinguishes between three types of MBeans:

Administration, Configuration and Runtime MBeans. For details on different MBean types @link WebLogicMBean

All MBeans have a name, a type and a domain. These attributes are reflected in the MBean's Object Name. The Object Name is the unique identifier for a given MBean across all domains, and has the following structure:

mydomain:Name=name,Type=type[,attr=value]...

Name is a name that is unique for a given domain and a given type. Examples of type include Server, WebComponent or JDBCConnectionPoolRuntime. Type is also used to distinguish between an administration and config MBean of a given type for example, the value of Type for a Server MBean is:

'Server' for an Administration MBean 'ServerConfig' for a Configuration MBean 'ServerRuntime' for a Runtime MBean

NOTE

1. "MBean" suffix is removed from the MBean interface name to get the base type of an MBean. Config or Runtime suffices are added to the base name (Server) to distinguish configuration and runtime MBeans from administration MBeans.

2. Specific MBean types have additional components. All runtime and configuration MBeans have a Location component that contains the name of the server on which that MBean is instantiated as its value.

For example: mydomain:Name=myServlet,Type=ServletRuntime,Location=myserver

Any MBean which has a child relationship with another MBean, has an extra attribute in its object name in the following format: TypeOfParentMBean=NameOfParentMBean. The following example objectname shows an administration LogMBean whose parent is a ServerMBean. Server is the type of Parent MBean, and myserver is the name of the Parent MBean:

mydomain:Name=mylog,Type=Log,Server=myserver

In otherwords anything that is not Name=,Type=,Location= indicates the parent relatinship.

Author:
Copyright © 2002 BEA Systems, Inc. All Rights Reserved.
See Also:
WebLogicMBean, Serialized Form

Field Summary
static java.lang.String LOCATION
          The key for the location component of a WebLogic ObjectName.
static java.lang.String NAME
          The key for the simple name component of a WebLogic ObjectName
static java.lang.String TYPE
          The key for the type component of a WebLogic ObjectName
static java.lang.String WEBLOGIC
          The weblogic domain
 
Constructor Summary
WebLogicObjectName(javax.management.ObjectName objectName, java.lang.String locationName)
          Deprecated. In WLS 6.1
WebLogicObjectName(java.lang.String fullObjectName)
          Deprecated. In WLS 6.1
WebLogicObjectName(java.lang.String domain, java.util.Hashtable properties)
          Deprecated. In WLS 6.1
WebLogicObjectName(java.lang.String name, java.lang.String type, java.lang.String domain)
          For Admin MBeans
WebLogicObjectName(java.lang.String name, java.lang.String type, java.lang.String domain, java.lang.String location)
          For non-Admin MBeans
WebLogicObjectName(java.lang.String nameArg, java.lang.String typeArg, java.lang.String domainArg, java.lang.String locationArg, WebLogicObjectName parentArg)
          For non-Admin MBeans
WebLogicObjectName(java.lang.String name, java.lang.String type, java.lang.String domain, WebLogicObjectName parent)
          For Admin MBeans
WebLogicObjectName(java.lang.String nameArg, java.lang.String typeArg, WebLogicObjectName parentArg)
          Deprecated. In WLS 6.1
WebLogicObjectName(WebLogicObjectName objectNameArg, WebLogicObjectName parentArg)
          Deprecated. In WLS 6.1
 
Method Summary
static java.lang.String extractDomain(java.lang.String fullWebLogicObjectName)
          Strip out the name component of a stringified WeblogicObjectName
 java.lang.String getLocation()
          Gets the location attribute of the WebLogicObjectName object
 java.lang.String getName()
          Gets the name attribute of the WebLogicObjectName object
 WebLogicObjectName getParent()
          Gets the parent attribute of the WebLogicObjectName object
 java.lang.String getType()
          Gets the type attribute of the WebLogicObjectName object
 int hashCode()
          Calculate the has code for the Name.
 boolean isAdmin()
          Gets the admin attribute of the WebLogicObjectName object
static boolean isAdmin(javax.management.ObjectName objectName)
          Gets the admin attribute of the WebLogicObjectName class
 boolean isConfig()
          Gets the config attribute of the WebLogicObjectName object
static boolean isConfig(javax.management.ObjectName objectName)
          Gets the config attribute of the WebLogicObjectName class
 boolean isRuntime()
          Gets the runtime attribute of the WebLogicObjectName object
static boolean isRuntime(javax.management.ObjectName objectName)
          Gets the runtime attribute of the WebLogicObjectName class
 
Methods inherited from class javax.management.ObjectName
equals, getCanonicalKeyPropertyListString, getCanonicalName, getDomain, getKeyProperty, getKeyPropertyList, getKeyPropertyListString, isPattern, isPropertyPattern, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

WEBLOGIC

public static final java.lang.String WEBLOGIC
The weblogic domain

NAME

public static final java.lang.String NAME
The key for the simple name component of a WebLogic ObjectName

TYPE

public static final java.lang.String TYPE
The key for the type component of a WebLogic ObjectName

LOCATION

public static final java.lang.String LOCATION
The key for the location component of a WebLogic ObjectName. This is the simple name of the server (i.e. myserver) on which MBean lives.
Constructor Detail

WebLogicObjectName

public WebLogicObjectName(java.lang.String fullObjectName)
                   throws javax.management.MalformedObjectNameException
Deprecated. In WLS 6.1
Builds a WebLogic ObjectName.

Parameters:
fullObjectName - Description of the Parameter
Throws:
javax.management.MalformedObjectNameException - Description of the Exception

WebLogicObjectName

public WebLogicObjectName(java.lang.String name,
                          java.lang.String type,
                          java.lang.String domain)
                   throws javax.management.MalformedObjectNameException

For Admin MBeans

Builds an ObjectName for Admin MBean.

Parameters:
name - Unique with in type, and domain.
type - Base type.
domain - The WLS/JMX domain name for the MBean.
Throws:
javax.management.MalformedObjectNameException -  

WebLogicObjectName

public WebLogicObjectName(java.lang.String name,
                          java.lang.String type,
                          java.lang.String domain,
                          java.lang.String location)
                   throws javax.management.MalformedObjectNameException

For non-Admin MBeans

Builds an ObjectName for a non-Admin MBean.

Parameters:
name - Unique with in type, and domain.
type - Type of the MBean must include Config or Runtime.
domain - The WLS/JMX domain name for the MBean.
location - The server on which the MBean is instantiated.
Throws:
javax.management.MalformedObjectNameException -  

WebLogicObjectName

public WebLogicObjectName(java.lang.String name,
                          java.lang.String type,
                          java.lang.String domain,
                          WebLogicObjectName parent)
                   throws javax.management.MalformedObjectNameException

For Admin MBeans

Builds an ObjectName for admin MBean with a parent.

Parameters:
name - Unique with in type, and domain.
type - Type of the MBean must include Config or Runtime.
domain - The WLS/JMX domain name for the MBean.
parent - The name of the parent for this MBean
Throws:
javax.management.MalformedObjectNameException - Description of the Exception

WebLogicObjectName

public WebLogicObjectName(WebLogicObjectName objectNameArg,
                          WebLogicObjectName parentArg)
                   throws javax.management.MalformedObjectNameException
Deprecated. In WLS 6.1

Parameters:
objectNameArg - Description of the Parameter
parentArg - Description of the Parameter
Throws:
javax.management.MalformedObjectNameException - Description of the Exception

WebLogicObjectName

public WebLogicObjectName(java.lang.String nameArg,
                          java.lang.String typeArg,
                          java.lang.String domainArg,
                          java.lang.String locationArg,
                          WebLogicObjectName parentArg)
                   throws javax.management.MalformedObjectNameException

For non-Admin MBeans

Builds an ObjectName for a non-Admin MBean with a parent.

Parameters:
name - Unique with in type, and domain.
type - Type of the MBean must include Config or Runtime.
domain - The WLS/JMX domain name for the MBean.
parent - The name of the parent for this MBean
Throws:
javax.management.MalformedObjectNameException - Description of the Exception

WebLogicObjectName

public WebLogicObjectName(java.lang.String nameArg,
                          java.lang.String typeArg,
                          WebLogicObjectName parentArg)
                   throws javax.management.MalformedObjectNameException
Deprecated. In WLS 6.1
Builds an ObjectName for a non-Admin MBean. Domain is same as that of the parent.

Parameters:
nameArg - Description of the Parameter
typeArg - Description of the Parameter
parentArg - Description of the Parameter
Throws:
javax.management.MalformedObjectNameException - Description of the Exception

WebLogicObjectName

public WebLogicObjectName(java.lang.String domain,
                          java.util.Hashtable properties)
                   throws javax.management.MalformedObjectNameException
Deprecated. In WLS 6.1
Builds an ObjectName for any MBean.

Parameters:
domain - Description of the Parameter
properties - Description of the Parameter
Throws:
javax.management.MalformedObjectNameException - Description of the Exception

WebLogicObjectName

public WebLogicObjectName(javax.management.ObjectName objectName,
                          java.lang.String locationName)
                   throws javax.management.MalformedObjectNameException
Deprecated. In WLS 6.1
Builds an ObjectName for any MBean, localizing it to locationName.

Parameters:
objectName - Description of the Parameter
locationName - Description of the Parameter
Throws:
javax.management.MalformedObjectNameException - Description of the Exception
Method Detail

isAdmin

public static boolean isAdmin(javax.management.ObjectName objectName)
Gets the admin attribute of the WebLogicObjectName class

Parameters:
objectName - Description of the Parameter
Returns:
The admin value

isConfig

public static boolean isConfig(javax.management.ObjectName objectName)
Gets the config attribute of the WebLogicObjectName class

Parameters:
objectName - Description of the Parameter
Returns:
The config value

isRuntime

public static boolean isRuntime(javax.management.ObjectName objectName)
Gets the runtime attribute of the WebLogicObjectName class

Parameters:
objectName - Description of the Parameter
Returns:
The runtime value

extractDomain

public static java.lang.String extractDomain(java.lang.String fullWebLogicObjectName)
                                      throws javax.management.MalformedObjectNameException
Strip out the name component of a stringified WeblogicObjectName

Parameters:
fullWebLogicObjectName - Description of the Parameter
Returns:
Description of the Return Value
Throws:
javax.management.MalformedObjectNameException - Description of the Exception

getName

public java.lang.String getName()
Gets the name attribute of the WebLogicObjectName object

Returns:
The name value

getType

public java.lang.String getType()
Gets the type attribute of the WebLogicObjectName object

Returns:
The type value

getLocation

public java.lang.String getLocation()
Gets the location attribute of the WebLogicObjectName object

Returns:
The location value

getParent

public WebLogicObjectName getParent()
Gets the parent attribute of the WebLogicObjectName object

Returns:
The parent value

isAdmin

public boolean isAdmin()
Gets the admin attribute of the WebLogicObjectName object

Returns:
The admin value

isConfig

public boolean isConfig()
Gets the config attribute of the WebLogicObjectName object

Returns:
The config value

isRuntime

public boolean isRuntime()
Gets the runtime attribute of the WebLogicObjectName object

Returns:
The runtime value

hashCode

public int hashCode()
Calculate the has code for the Name.

Returns:
 
Overrides:
hashCode in class javax.management.ObjectName

Documentation is available at
http://download.oracle.com/docs/cd/E13222_01/wls/docs81b