org.objectweb.jonas.jmx
Class ManagementReprImplJSR160

java.lang.Object
  extended byorg.objectweb.jonas.jmx.ManagementReprImplJSR160
All Implemented Interfaces:
ManagementRepr

public class ManagementReprImplJSR160
extends java.lang.Object
implements ManagementRepr

Provides a management representative to be used by JMX based management applications.

Author:
Adriana Danes

Constructor Summary
protected ManagementReprImplJSR160()
          ManagementRepr object constructor
 
Method Summary
 java.lang.Object getAttribute(javax.management.ObjectName on, java.lang.String attribute)
           
 javax.management.AttributeList getAttributes(javax.management.ObjectName on, java.lang.String[] attributes)
           
 javax.naming.Context getContext()
          This method is no more necessary with JSR160 support
 java.lang.String getCurrentRMIConnectorName()
          This method is no more necessary with JSR160 support
 java.lang.String getJonasNamingServiceURL()
          This method is no more necessary with JSR160 support
 javax.management.MBeanInfo getMBeanInfo(javax.management.ObjectName name)
           
 javax.management.MBeanServerConnection getMBeanServerConnection()
           
 java.util.Set getRMIConnectorsNames()
          This method is no more necessary with JSR160 support
 java.lang.String getServerName()
           
 java.lang.Object invoke(javax.management.ObjectName on, java.lang.String operation, java.lang.Object[] param, java.lang.String[] signature)
           
 boolean isRegistered(javax.management.ObjectName on)
           
 java.util.Set queryNames(javax.management.ObjectName on)
           
 void resetCurrentRMIConnectorName()
          This method is no more necessary with JSR160 support
 void setAttribute(javax.management.ObjectName on, java.lang.String attribute, java.lang.Object value)
           
 javax.management.AttributeList setAttributes(javax.management.ObjectName on, javax.management.AttributeList attributes)
           
 void setCurrentRMIConnectorName(java.lang.String name)
          This method is no more necessary with JSR160 support
 void setJonasNamingServiceURL(java.lang.String url)
          This method is no more necessary with JSR160 support
 void setMBeanServerConnection(javax.management.MBeanServerConnection mbeanServerConnection)
           
 void setNamingEnvCtx(java.util.Properties env)
          This method is no more necessary with JSR160 support
 void setServerName(java.lang.String serverName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ManagementReprImplJSR160

protected ManagementReprImplJSR160()
ManagementRepr object constructor

Method Detail

isRegistered

public boolean isRegistered(javax.management.ObjectName on)
Specified by:
isRegistered in interface ManagementRepr
Parameters:
on - The object name of the MBean to be checked
Returns:
True if the MBean is already registered in the MBean server, false otherwise or if an exception is catched.

getAttribute

public java.lang.Object getAttribute(javax.management.ObjectName on,
                                     java.lang.String attribute)
                              throws ManagementException
Specified by:
getAttribute in interface ManagementRepr
Parameters:
on - The ObjectName of the MBean from which the attribute is to be retrieved.
attribute - A String specifying the name of the attribute to be retrieve.
Returns:
The value of the attribute.
Throws:
ManagementException - management operation failed

getAttributes

public javax.management.AttributeList getAttributes(javax.management.ObjectName on,
                                                    java.lang.String[] attributes)
                                             throws ManagementException
Specified by:
getAttributes in interface ManagementRepr
Parameters:
on - The ObjectName of the MBean of which attribute are to be retrieved.
attributes - A list of the attributes to be retrieved.
Returns:
Thelist of retrieved attributes.
Throws:
ManagementException - management operation failed

setAttribute

public void setAttribute(javax.management.ObjectName on,
                         java.lang.String attribute,
                         java.lang.Object value)
                  throws ManagementException
Specified by:
setAttribute in interface ManagementRepr
Parameters:
on - The ObjectName of the MBean of which the attribute is to be set.
attribute - A String specifying the name of the attribute to be retrieve.
value - The value to set to the attribute.
Throws:
ManagementException - management operation failed

setAttributes

public javax.management.AttributeList setAttributes(javax.management.ObjectName on,
                                                    javax.management.AttributeList attributes)
                                             throws ManagementException
Specified by:
setAttributes in interface ManagementRepr
Parameters:
on - The ObjectName of the MBean of which the attribute is to be set.
attributes - A list of attributes: The identification of the attribute to be set and the value it is to be set to
Returns:
The list of attributes that were set, with their new values.
Throws:
ManagementException - management operation failed

invoke

public java.lang.Object invoke(javax.management.ObjectName on,
                               java.lang.String operation,
                               java.lang.Object[] param,
                               java.lang.String[] signature)
                        throws ManagementException
Specified by:
invoke in interface ManagementRepr
Parameters:
on - The ObjectName of the MBean of which an operation is to be executed
operation - name of the operation to execute
param - arguments of the operation to execute
signature - types of arguments
Returns:
return the operation result
Throws:
ManagementException - management operation failed

queryNames

public java.util.Set queryNames(javax.management.ObjectName on)
                         throws ManagementException
Specified by:
queryNames in interface ManagementRepr
Parameters:
on - The ObjectName of the target MBean
Returns:
A set containing the ObjectNames for the MBeans selected.
Throws:
ManagementException - management operation failed

getMBeanInfo

public javax.management.MBeanInfo getMBeanInfo(javax.management.ObjectName name)
                                        throws ManagementException
Specified by:
getMBeanInfo in interface ManagementRepr
Returns:
An instance of MBeanInfo allowing the retrieval of all attributes and operations of this MBean.
Throws:
ManagementException - management operation failed

getContext

public javax.naming.Context getContext()
                                throws javax.naming.NamingException
This method is no more necessary with JSR160 support

Specified by:
getContext in interface ManagementRepr
Returns:
null
Throws:
javax.naming.NamingException - not possible anymore

getCurrentRMIConnectorName

public java.lang.String getCurrentRMIConnectorName()
This method is no more necessary with JSR160 support

Specified by:
getCurrentRMIConnectorName in interface ManagementRepr
Returns:
a non null String

setCurrentRMIConnectorName

public void setCurrentRMIConnectorName(java.lang.String name)
                                throws java.lang.Exception
This method is no more necessary with JSR160 support

Specified by:
setCurrentRMIConnectorName in interface ManagementRepr
Throws:
java.lang.Exception

resetCurrentRMIConnectorName

public void resetCurrentRMIConnectorName()
This method is no more necessary with JSR160 support

Specified by:
resetCurrentRMIConnectorName in interface ManagementRepr

getRMIConnectorsNames

public java.util.Set getRMIConnectorsNames()
                                    throws javax.naming.NamingException
This method is no more necessary with JSR160 support

Specified by:
getRMIConnectorsNames in interface ManagementRepr
Returns:
null
Throws:
javax.naming.NamingException - not possible anymore

getJonasNamingServiceURL

public java.lang.String getJonasNamingServiceURL()
This method is no more necessary with JSR160 support

Specified by:
getJonasNamingServiceURL in interface ManagementRepr
Returns:
null

setJonasNamingServiceURL

public void setJonasNamingServiceURL(java.lang.String url)
                              throws javax.naming.NamingException
This method is no more necessary with JSR160 support

Specified by:
setJonasNamingServiceURL in interface ManagementRepr
Throws:
javax.naming.NamingException - not possible anymore

setNamingEnvCtx

public void setNamingEnvCtx(java.util.Properties env)
                     throws javax.naming.NamingException
This method is no more necessary with JSR160 support

Specified by:
setNamingEnvCtx in interface ManagementRepr
Throws:
javax.naming.NamingException - not possible anymore

getMBeanServerConnection

public javax.management.MBeanServerConnection getMBeanServerConnection()
Returns:
Returns the mbeanServerConnection.

setMBeanServerConnection

public void setMBeanServerConnection(javax.management.MBeanServerConnection mbeanServerConnection)
Parameters:
mbeanServerConnection - The mbeanServerConnection to set.

getServerName

public java.lang.String getServerName()

setServerName

public void setServerName(java.lang.String serverName)