net.sf.panoptes.module.jmx
Class MBeanComponent

java.lang.Object
  |
  +--net.sf.panoptes.model.node.Node
        |
        +--net.sf.panoptes.model.component.Component
              |
              +--net.sf.panoptes.module.jmx.MBeanComponent

public class MBeanComponent
extends Component

MBeanComponent.java Wraps an MBean and implements helper methods. Original code by Stefan Groschupf(sg@media-style.com).

Version:
0.1
Author:
Dag Liodden

Field Summary
 
Fields inherited from class net.sf.panoptes.model.node.Node
ICON_BROKEN_LINK, ICON_CONNECTION, ICON_CONNECTIONS_FOLDER, ICON_DATASOURCE, ICON_DOMAIN, ICON_ERROR, ICON_FOLDER, ICON_INFO, ICON_LOG, ICON_LOG_FOLDER, ICON_MBEAN, ICON_QUERY_FOLDER, ICON_SERVER, ICON_SERVICE, ICON_SESSION, ICON_USER, ICON_WARNING
 
Constructor Summary
MBeanComponent()
          Constructor for MBeanComponent.
 
Method Summary
 int countAttributes()
          Method countAttributes.
 javax.management.Attribute[] getAttributes()
          Method getAttributes.
 java.lang.Object getAttributeValue(java.lang.String attributeName)
          Method getAttrbute.
 NodeDescriptor getConfigDescriptor()
           
 java.lang.String[] getConfiguratorScripts()
           
 java.lang.Object getEditableValue()
           
 org.eclipse.swt.graphics.Image getIcon()
           
 javax.management.ObjectName getObjectName()
           
 Operation[] getOperations()
          Method getOperations.
 MBeanServerComponent getServer()
           
 void init()
          Called when the Component has had all it's attributes set and should be ready for initialization.
 void invokeWithoutParams(java.lang.String operation)
          Simple method to test invocation from Jelly script.
 void refresh()
          Method refresh.
 void setAttrbuteValue(java.lang.String attributeName, java.lang.Object value)
           
 void setMBeanInfo(javax.management.MBeanInfo info)
          Method setMBeanInfo.
protected  void setMBeanName(javax.management.ObjectName name)
          Sets the ObjectName of the MBean this component wraps..
 void setMBeanServerComponent(MBeanServerComponent server)
           
 java.lang.String toString()
           
 
Methods inherited from class net.sf.panoptes.model.component.Component
acceptsChildren, getChildren, getComponentName, getComponentRegistry, setComponentName, setComponentRegistry
 
Methods inherited from class net.sf.panoptes.model.node.Node
addUpdateListener, createImage, notifyListeners, removeUpdateListener, setConfigDescriptor, setIcon
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MBeanComponent

public MBeanComponent()
Constructor for MBeanComponent.

Method Detail

setMBeanName

protected void setMBeanName(javax.management.ObjectName name)
Sets the ObjectName of the MBean this component wraps..

Parameters:
name -

setMBeanServerComponent

public void setMBeanServerComponent(MBeanServerComponent server)

getAttributes

public javax.management.Attribute[] getAttributes()
Method getAttributes.

Returns:
Attribute[]

getOperations

public Operation[] getOperations()
Method getOperations.


setMBeanInfo

public void setMBeanInfo(javax.management.MBeanInfo info)
Method setMBeanInfo.

Parameters:
info -

getServer

public MBeanServerComponent getServer()

invokeWithoutParams

public void invokeWithoutParams(java.lang.String operation)
                         throws javax.management.InstanceNotFoundException,
                                javax.management.MBeanException,
                                javax.management.ReflectionException,
                                java.io.IOException
Simple method to test invocation from Jelly script. Doesn't support parameters or return types.

Parameters:
operation - name of the operation to invoke
javax.management.InstanceNotFoundException
javax.management.MBeanException
javax.management.ReflectionException
java.io.IOException

refresh

public void refresh()
Method refresh.


getObjectName

public javax.management.ObjectName getObjectName()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

countAttributes

public int countAttributes()
Method countAttributes.

Returns:
int

getEditableValue

public java.lang.Object getEditableValue()
See Also:
org.eclipse.ui.views.properties.IPropertySource#getEditableValue()

getAttributeValue

public java.lang.Object getAttributeValue(java.lang.String attributeName)
Method getAttrbute.

Returns:
String

setAttrbuteValue

public void setAttrbuteValue(java.lang.String attributeName,
                             java.lang.Object value)

getIcon

public org.eclipse.swt.graphics.Image getIcon()
Specified by:
getIcon in class Node
Returns:
See Also:
com.gllt.troodon.console.Node#getIconName()

getConfigDescriptor

public NodeDescriptor getConfigDescriptor()
Specified by:
getConfigDescriptor in class Node
See Also:
com.gllt.troodon.console.Node#getConfigDescriptor()

getConfiguratorScripts

public java.lang.String[] getConfiguratorScripts()
Overrides:
getConfiguratorScripts in class Component

init

public void init()
Description copied from class: Component
Called when the Component has had all it's attributes set and should be ready for initialization.

Specified by:
init in class Component


Copyright © 2003 . All Rights Reserved.