|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectflex.management.BaseControl
public abstract class BaseControl
The implementation of the BaseControlMBean interface. This
abstract class provides the core functionality that all Flex control MBeans
require.
Defining concrete implementations of getId() and
getType() are left to subclasses, but this base class does
provide access to the parent MBean for each instance. This class also
implements the MBeanRegistration interface, and it
automatically stores a reference to the MBean server in each instance upon
registration. Subclasses may choose to override none, any, or all of the
methods defined by the MBeanRegistration interface, but any
overrides should be sure to invoke the overridden method with a call to their
superclass.
The register() method provides a simple and consistent way to
register instances with the MBean server, and the
getObjectName() method gaurantees consistent, well-formed
ObjectNames for all MBean instances.
| Field Summary | |
|---|---|
static String |
DOMAIN_PREFIX
The prefix used for the domain part of control MBean names. |
| Constructor Summary | |
|---|---|
BaseControl(BaseControl parent)
Constructs a BaseControl instance that references its
parent; the parent may be null for root control MBeans. |
|
| Method Summary | |
|---|---|
String |
getApplicationId()
Returns an identifier for the application that hosts the component that this control manages. |
abstract String |
getId()
Returns the id for this MBean. |
MBeanServer |
getMBeanServer()
The MBeanServer that this instance is registered with. |
ObjectName |
getObjectName()
Returns the ObjectName for this instance, according to the
following format:
{domain}[.{appId}]:type={type}[,{parent type}={parent id}]*[,server={server}]?,id={id}. |
ObjectName |
getParent()
Returns the parent for this MBean. |
BaseControl |
getParentControl()
Returns the parent BaseControl of this instance. |
AdminConsoleDisplayRegistrar |
getRegistrar()
|
abstract String |
getType()
Returns the type for this MBean. |
void |
postDeregister()
Implements javax.management.MBeanRegistration.postDeregister. |
void |
postRegister(Boolean registrationDone)
Implements javax.management.MBeanRegistration.postRegister. |
void |
preDeregister()
Implements javax.management.MBeanRegistration.preDeregister. |
ObjectName |
preRegister(MBeanServer server,
ObjectName name)
Implements javax.management.MBeanRegistration.preRegister. |
void |
register()
Registers this instance with the MBean server. |
void |
setStartTimestamp(Date value)
Sets the start timestamp for the managed component. |
void |
unregister()
Unregisters this instance from the MBean server if it has been registered previously. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DOMAIN_PREFIX
| Constructor Detail |
|---|
public BaseControl(BaseControl parent)
BaseControl instance that references its
parent; the parent may be null for root control MBeans.
parent - The parent BaseControl for this instance or
null if this instance is the root of a control hierarchy.| Method Detail |
|---|
public abstract String getId()
BaseControlMBeanid key in the ObjectName for this MBean.
getId in interface BaseControlMBeanpublic abstract String getType()
BaseControlMBeantype key in the ObjectName for this MBean.
getType in interface BaseControlMBeanpublic final ObjectName getParent()
BaseControlMBeanObjectName
for the parent MBean that conceptually contains this MBean instance. If no
parent exists, this method returns null.
getParent in interface BaseControlMBeanObjectName for the parent of this MBean instance.public String getApplicationId()
public AdminConsoleDisplayRegistrar getRegistrar()
public final BaseControl getParentControl()
BaseControl of this instance.
BaseControl.public final MBeanServer getMBeanServer()
MBeanServer that this instance is registered with. If
this instance has not been registered this method returns
null.
MBeanServer that this instance is registered
with.public final void register()
ManagementException - If an MBeanRegistrationException
or InstanceAlreadyExistsException is thrown while
registering this MBean, the typed exception is wrapped in a
runtime ManagementException and rethrown.public final void unregister()
public final ObjectName getObjectName()
ObjectName for this instance, according to the
following format:
{domain}[.{appId}]:type={type}[,{parent type}={parent id}]*[,server={server}]?,id={id}.
domain: The domain specified by the DOMAIN_PREFIX
constant followed by the application identifier if one is available.type: The short type name of the resource managed by
the MBean.MessageBrokerControlMBean manages
the flex.messaging.MessageBroker so:
type=MessageBroker id: The id value for the resource managed by this
MBean. If no name or id is available on the resource, an id will be
fabricated according to this strategy:MessageBrokerControlMBean. The FDS
ObjectNames used for these MBeans describe this
containment in the following fashion. First, the 'type' key for a
contained MBean indicates the containment hierarchy for the bean. So, the
ObjectName for an RTMPEndpointControlMBean
would be: type=MessageBroker.RTMPEndpointObjectName for this RTMPEndpointControlMBean
also contains a containment key:
MessageBroker=MessageBroker1ObjectName for any MBean instance to fully describe its
specific location in the hierarchy. To complete the example, the full
ObjectName for the example
RTMPEndpointControlMBean would be:
flex:type=MessageBroker.RTMPEndpoint,MessageBroker=MessageBroker1,id=RTMPEndpoint1
If the MBean is registered with the MBean server, this method returns the
ObjectName that the MBean was registered under and this
value may contain additional key-value pairs injected by the container or
MBean server.
ObjectName for this instance.
public ObjectName preRegister(MBeanServer server,
ObjectName name)
throws Exception
javax.management.MBeanRegistration.preRegister.
Allows the MBean to perform any operations it needs before being
registered in the MBean server. This base implementation stores a
reference to the MBean server that may be accessed via
getMBeanServer(). If subclasses override, they must call
super.preRegister().
preRegister in interface MBeanRegistrationserver - The Mbean server in which the MBean will be registered.name - The object name of the MBean.
Exceptionpublic void postRegister(Boolean registrationDone)
javax.management.MBeanRegistration.postRegister.
Allows the MBean to perform any operations needed after having been
registered in the MBean server or after the registration has failed. This
base implementation is a no-op that may be overridden.
postRegister in interface MBeanRegistrationregistrationDone - Indicates whether or not the MBean was
successfully registered in the MBean server.
public void preDeregister()
throws Exception
javax.management.MBeanRegistration.preDeregister.
Allows the MBean to perform any operations needed after having been
unregistered in the MBean server. This base implementation is a no-op
that may be overridden.
preDeregister in interface MBeanRegistrationExceptionpublic void postDeregister()
javax.management.MBeanRegistration.postDeregister.
Allows the MBean to perform any operations it needs before being
unregistered by the MBean server. This base implementation is a no-op
that may be overridden.
postDeregister in interface MBeanRegistrationpublic void setStartTimestamp(Date value)
value - The start timestamp for the managed component.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/blazeds/1/javadoc/flex/management/BaseControl.html