Oracle Fusion Middleware
Oracle WebLogic Server Administration Console API Reference
12c Release 1 (12.1.1)

Part Number E24394-01

com.bea.console.handles
Interface Handle

All Superinterfaces:
Serializable

public interface Handle
extends Serializable

Contains methods that retrieve the identity of an object.

The Administration Console uses objects that implement this interface (handles) to uniquely identify an instance of a Java bean. For example, a WebLogic Server domain could contain multiple instances of ServerMBean. For a ServerMBean instance named ServerA, the Administration Console populates a Java bean of type org.apache.struts.action.ActionForm with data from the ServerA MBean. To uniquely identify the ActionForm bean instance and correlate it to the ServerA MBean, the Administration Console instantiates a handle and sets the handle as a property of the ActionForm bean.

Handles that correlate ActionForm beans with MBeans typically are of type JMXHandle and contain the JMX ObjectName of the corresponding MBean.

The Apache Struts controller servlet places handles in HttpServletRequest objects, thus making them available to Struts Actions, Beehive PageFlows, or JSPs. Handles can be placed in requests of any scope.

Implementing Your Own Handle

You can create your own objects that implement this interface. Your handles must extend com.bea.console.handles.HandleImpl (not publically documented) and provide at least one of the following constructors:

See Also:
http://struts.apache.org, javax.management.ObjectName

Method Summary
 String getDisplayName()
           Returns a human readable name for the artifact (such as an MBean) referenced by this handle.
 String getObjectIdentifier()
          The programmatic name of this object, which comprises the class and object identifier that was passed to the handle's constructor.
 String getObjectType()
           Returns the value of the Type key property that was passed to the constructor of this handle.
 String getType()
          Returns the Java type of this handle.
 boolean isInitialized()
          Returns true if a class and object identifier were passed to the constructor for this handle.
 boolean isObjectType(String objectType)
          Returns true if this handle's object identifier contains the specified value.
 

Method Detail

getDisplayName

String getDisplayName()

Returns a human readable name for the artifact (such as an MBean) referenced by this handle. This name should be suitable for use in breadcrumbs, page titles, and other locations where the Administration Console displays the human readable name of an artifact.

This name does not need to reflect the programmatic name of the artifact, it does not need to be unique, and it does not need to convey type information. Therefore it is not suitable for comparing the identity of two handles.

Returns:
The display string, for example "myserver".

getType

String getType()
Returns the Java type of this handle.

Returns:
The type of the handle object as a String, for example "com.bea.console.handles.JMXHandle"

getObjectType

String getObjectType()

Returns the value of the Type key property that was passed to the constructor of this handle.

When you construct a handle you pass an object identifier, which could be either a String or a JMX ObjectName, that contains the following sequence of characters:
Type=identifier
where identifier is a character sequence that you use to identify instances of this handle.

For example, an object identifier could be "com.mycompany:Name=myApp1,Type=myAppMBean".

Returns:
The value of the Type key property as a String, for example "myAppMBean"

isObjectType

boolean isObjectType(String objectType)
Returns true if this handle's object identifier contains the specified value.

Returns:
The type string, for example "myAppMBean"
See Also:
Handle.getObjectType()

getObjectIdentifier

String getObjectIdentifier()
The programmatic name of this object, which comprises the class and object identifier that was passed to the handle's constructor. This name is used to uniquely identify an artifact within the WebLogic Server domain. It does not need to be human readable.

Returns:
a String containing the object identifier.

isInitialized

boolean isInitialized()
Returns true if a class and object identifier were passed to the constructor for this handle. Returns false if an empty constructor (handle()) was used.

Returns:
true if initialized

Copyright 1996, 2011, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Oracle Fusion Middleware
Oracle WebLogic Server Administration Console API Reference
12c Release 1 (12.1.1)

Part Number E24394-01