org.jboss.jmx.interfaces
Interface JMXConnector

All Known Subinterfaces:
JMXConnectorMBean, RMIClientConnectorImplMBean

public interface JMXConnector

Client-Side JMX Connector Interface.
Attention:
Please note that this interface has two purposes. First it adds additional runtime exception to the methods because of the nature of the remote connection. It also declares the unusable methods throwing the UnsupportedOperationException which is thrown always by the Connector implementation. The second purpose is to have interface to discuss it.

Author:
Andreas "Mad" Schaefer

Method Summary
 void addNotificationListener(javax.management.ObjectName pName, javax.management.NotificationListener pListener, javax.management.NotificationFilter pFilter, java.lang.Object pHandback)
          Adds the given Notification Listener in a way that the Notification Events are send back to the listener
Please asume that the listening is terminated when the instance of these interface goes down.
 void addNotificationListener(javax.management.ObjectName pName, javax.management.ObjectName pListener, javax.management.NotificationFilter pFilter, java.lang.Object pHandback)
           
 javax.management.ObjectInstance createMBean(java.lang.String pClassName, javax.management.ObjectName pName)
           
 javax.management.ObjectInstance createMBean(java.lang.String pClassName, javax.management.ObjectName pNameToAssign, java.lang.Object[] pParams, java.lang.String[] pSignature)
          Instantiates the given class and registers it on the remote MBeanServer and returns an Object Instance of the MBean.
 javax.management.ObjectInstance createMBean(java.lang.String pClassName, javax.management.ObjectName pName, javax.management.ObjectName pLoaderName)
           
 javax.management.ObjectInstance createMBean(java.lang.String pClassName, javax.management.ObjectName pName, javax.management.ObjectName pLoaderName, java.lang.Object[] pParams, java.lang.String[] pSignature)
           
 java.io.ObjectInputStream deserialize(javax.management.ObjectName pName, byte[] pData)
           
 java.io.ObjectInputStream deserialize(java.lang.String pClassName, byte[] pData)
           
 java.io.ObjectInputStream deserialize(java.lang.String pClassName, javax.management.ObjectName pLoaderName, byte[] pData)
           
 java.lang.Object getAttribute(javax.management.ObjectName pName, java.lang.String pAttribute)
           
 javax.management.AttributeList getAttributes(javax.management.ObjectName pName, java.lang.String[] pAttributes)
           
 java.lang.String getDefaultDomain()
           
 java.lang.Integer getMBeanCount()
           
 javax.management.MBeanInfo getMBeanInfo(javax.management.ObjectName pName)
           
 javax.management.ObjectInstance getObjectInstance(javax.management.ObjectName pName)
           
 java.lang.Object instantiate(java.lang.String pClassName)
          Instantiate the given class on the remote MBeanServer and returns a Object Handler you can use to register it as a MBean with registerMBean() or as a parameter to createMBean() or instantiate() method which takes it as a parameter.
 java.lang.Object instantiate(java.lang.String pClassName, java.lang.Object[] pParams, java.lang.String[] pSignature)
          Instantiate the given class on the remote MBeanServer and returns a Object Handler you can use to register it as a MBean with registerMBean()
 java.lang.Object instantiate(java.lang.String pClassName, javax.management.ObjectName pLoaderName)
           
 java.lang.Object instantiate(java.lang.String pClassName, javax.management.ObjectName pLoaderName, java.lang.Object[] pParams, java.lang.String[] pSignature)
           
 java.lang.Object invoke(javax.management.ObjectName pName, java.lang.String pActionName, java.lang.Object[] pParams, java.lang.String[] pSignature)
           
 boolean isInstanceOf(javax.management.ObjectName pName, java.lang.String pClassName)
           
 boolean isRegistered(javax.management.ObjectName pName)
           
 java.util.Set queryMBeans(javax.management.ObjectName pName, javax.management.QueryExp pQuery)
           
 java.util.Set queryNames(javax.management.ObjectName pName, javax.management.QueryExp pQuery)
           
 javax.management.ObjectInstance registerMBean(java.lang.Object pObjectHandler, javax.management.ObjectName pNaemToAssign)
          Register the given Object (already instantiated) as a MBean on the remote MBeanServer
 void removeNotificationListener(javax.management.ObjectName pName, javax.management.NotificationListener pListener)
          Remoes the given Notification Listener in a way that all involved instances are removed and the remote listener is removed from the broadcaster.
 void removeNotificationListener(javax.management.ObjectName pName, javax.management.ObjectName pListener)
           
 void setAttribute(javax.management.ObjectName pName, javax.management.Attribute pAttribute)
           
 javax.management.AttributeList setAttributes(javax.management.ObjectName pName, javax.management.AttributeList pAttributes)
           
 void unregisterMBean(javax.management.ObjectName pName)
           
 

Method Detail

instantiate

public java.lang.Object instantiate(java.lang.String pClassName)
                             throws javax.management.ReflectionException,
                                    javax.management.MBeanException
Instantiate the given class on the remote MBeanServer and returns a Object Handler you can use to register it as a MBean with registerMBean() or as a parameter to createMBean() or instantiate() method which takes it as a parameter.
Parameters:
pClassName - Class name of the class to be loaded and instantiated
Returns:
Object handler. Please use this handler to register it as MBean or as a parameter in the other methods as a parameter. The server-side connector will look up for an object handler parameter and then replace the object handler by the effective object.

instantiate

public java.lang.Object instantiate(java.lang.String pClassName,
                                    javax.management.ObjectName pLoaderName)
                             throws javax.management.ReflectionException,
                                    javax.management.MBeanException,
                                    javax.management.InstanceNotFoundException

instantiate

public java.lang.Object instantiate(java.lang.String pClassName,
                                    java.lang.Object[] pParams,
                                    java.lang.String[] pSignature)
                             throws javax.management.ReflectionException,
                                    javax.management.MBeanException
Instantiate the given class on the remote MBeanServer and returns a Object Handler you can use to register it as a MBean with registerMBean()
Parameters:
pClassName - Class name of the class to be loaded and instantiated
pParams - Array of parameter passed to the creator of the class. If one is of data type Object handler it will be replaced on the server-side by its effective object.
pSignature - Array of Class Names (full qualified) to find the right parameter. When there is an ObjectHandler as a parameter type then it will be replaced on the server- side by the class name of the effective object) otherwise it will be kept.
Returns:
Object handler. Please use this handler to register it as MBean or as a parameter in the other methods as a parameter. The server-side connector will look up for an object handler parameter and then replace the object handler by the effective object.

instantiate

public java.lang.Object instantiate(java.lang.String pClassName,
                                    javax.management.ObjectName pLoaderName,
                                    java.lang.Object[] pParams,
                                    java.lang.String[] pSignature)
                             throws javax.management.ReflectionException,
                                    javax.management.MBeanException,
                                    javax.management.InstanceNotFoundException

createMBean

public javax.management.ObjectInstance createMBean(java.lang.String pClassName,
                                                   javax.management.ObjectName pName)
                                            throws javax.management.ReflectionException,
                                                   javax.management.InstanceAlreadyExistsException,
                                                   javax.management.MBeanRegistrationException,
                                                   javax.management.MBeanException,
                                                   javax.management.NotCompliantMBeanException

createMBean

public javax.management.ObjectInstance createMBean(java.lang.String pClassName,
                                                   javax.management.ObjectName pName,
                                                   javax.management.ObjectName pLoaderName)
                                            throws javax.management.ReflectionException,
                                                   javax.management.InstanceAlreadyExistsException,
                                                   javax.management.MBeanRegistrationException,
                                                   javax.management.MBeanException,
                                                   javax.management.NotCompliantMBeanException,
                                                   javax.management.InstanceNotFoundException

createMBean

public javax.management.ObjectInstance createMBean(java.lang.String pClassName,
                                                   javax.management.ObjectName pNameToAssign,
                                                   java.lang.Object[] pParams,
                                                   java.lang.String[] pSignature)
                                            throws javax.management.ReflectionException,
                                                   javax.management.InstanceAlreadyExistsException,
                                                   javax.management.MBeanRegistrationException,
                                                   javax.management.MBeanException,
                                                   javax.management.NotCompliantMBeanException
Instantiates the given class and registers it on the remote MBeanServer and returns an Object Instance of the MBean.
Parameters:
pClassName - Class name of the class to be loaded and instantiated
pNameToAssign - Object Name the new MBean should be assigned to
pParams - Array of parameter passed to the creator of the class. If one is of data type Object handler it will be replaced on the server-side by its effective object.
pSignature - Array of Class Names (full qualified) to find the right parameter. When there is an ObjectHandler as a parameter type then it will be replaced on the server- side by the class name of the effective object) otherwise it will be kept.
Returns:
Object Instance of the new MBean

createMBean

public javax.management.ObjectInstance createMBean(java.lang.String pClassName,
                                                   javax.management.ObjectName pName,
                                                   javax.management.ObjectName pLoaderName,
                                                   java.lang.Object[] pParams,
                                                   java.lang.String[] pSignature)
                                            throws javax.management.ReflectionException,
                                                   javax.management.InstanceAlreadyExistsException,
                                                   javax.management.MBeanRegistrationException,
                                                   javax.management.MBeanException,
                                                   javax.management.NotCompliantMBeanException,
                                                   javax.management.InstanceNotFoundException

registerMBean

public javax.management.ObjectInstance registerMBean(java.lang.Object pObjectHandler,
                                                     javax.management.ObjectName pNaemToAssign)
                                              throws javax.management.InstanceAlreadyExistsException,
                                                     javax.management.MBeanRegistrationException,
                                                     javax.management.NotCompliantMBeanException
Register the given Object (already instantiated) as a MBean on the remote MBeanServer
Parameters:
pObjectHandler - Object Handler of th given object to register as MBean
pNaemToAssign - Object Name to MBean is assigned to
Returns:
Object Instance of the new MBean

unregisterMBean

public void unregisterMBean(javax.management.ObjectName pName)
                     throws javax.management.InstanceNotFoundException,
                            javax.management.MBeanRegistrationException

getObjectInstance

public javax.management.ObjectInstance getObjectInstance(javax.management.ObjectName pName)
                                                  throws javax.management.InstanceNotFoundException

queryMBeans

public java.util.Set queryMBeans(javax.management.ObjectName pName,
                                 javax.management.QueryExp pQuery)

queryNames

public java.util.Set queryNames(javax.management.ObjectName pName,
                                javax.management.QueryExp pQuery)

isRegistered

public boolean isRegistered(javax.management.ObjectName pName)

isInstanceOf

public boolean isInstanceOf(javax.management.ObjectName pName,
                            java.lang.String pClassName)
                     throws javax.management.InstanceNotFoundException

getMBeanCount

public java.lang.Integer getMBeanCount()

getAttribute

public java.lang.Object getAttribute(javax.management.ObjectName pName,
                                     java.lang.String pAttribute)
                              throws javax.management.MBeanException,
                                     javax.management.AttributeNotFoundException,
                                     javax.management.InstanceNotFoundException,
                                     javax.management.ReflectionException

getAttributes

public javax.management.AttributeList getAttributes(javax.management.ObjectName pName,
                                                    java.lang.String[] pAttributes)
                                             throws javax.management.InstanceNotFoundException,
                                                    javax.management.ReflectionException

setAttribute

public void setAttribute(javax.management.ObjectName pName,
                         javax.management.Attribute pAttribute)
                  throws javax.management.InstanceNotFoundException,
                         javax.management.AttributeNotFoundException,
                         javax.management.InvalidAttributeValueException,
                         javax.management.MBeanException,
                         javax.management.ReflectionException

setAttributes

public javax.management.AttributeList setAttributes(javax.management.ObjectName pName,
                                                    javax.management.AttributeList pAttributes)
                                             throws javax.management.InstanceNotFoundException,
                                                    javax.management.ReflectionException

invoke

public java.lang.Object invoke(javax.management.ObjectName pName,
                               java.lang.String pActionName,
                               java.lang.Object[] pParams,
                               java.lang.String[] pSignature)
                        throws javax.management.InstanceNotFoundException,
                               javax.management.MBeanException,
                               javax.management.ReflectionException

getDefaultDomain

public java.lang.String getDefaultDomain()

addNotificationListener

public void addNotificationListener(javax.management.ObjectName pName,
                                    javax.management.NotificationListener pListener,
                                    javax.management.NotificationFilter pFilter,
                                    java.lang.Object pHandback)
                             throws javax.management.InstanceNotFoundException
Adds the given Notification Listener in a way that the Notification Events are send back to the listener
Please asume that the listening is terminated when the instance of these interface goes down.
Parameters:
pBroadcasterName - Name of the Broadcaster MBean on the remote side
pListener - Local notification listener
pFilter - In general there are three ways this could work: 1) A copy of the filter is send to the server but then the Filter cannot interact with the client. This is default. 2) Wrapper around the filter therefore the server sends the filter call to the client to be performed. This filter must be a subclass of RemoteNotificationListener. 3) All Notification events are sent to the client and the client performs the filtering. This filter must be a subclass of LocalNotificationListener.
pHandback - Object to be send back to the listener. To make it complete transparent to the client an Object Handler is sent to the Server and and when a Notification comes back it will be looked up and send to the client. Therefore it must not be serializable.

removeNotificationListener

public void removeNotificationListener(javax.management.ObjectName pName,
                                       javax.management.NotificationListener pListener)
                                throws javax.management.InstanceNotFoundException,
                                       javax.management.ListenerNotFoundException
Remoes the given Notification Listener in a way that all involved instances are removed and the remote listener is removed from the broadcaster.
Please asume that the listening is terminated when the instance of these interface goes down.
Parameters:
pBroadcasterName - Name of the Broadcaster MBean on the remote side
pListener - Local notification listener

getMBeanInfo

public javax.management.MBeanInfo getMBeanInfo(javax.management.ObjectName pName)
                                        throws javax.management.InstanceNotFoundException,
                                               javax.management.IntrospectionException,
                                               javax.management.ReflectionException

addNotificationListener

public void addNotificationListener(javax.management.ObjectName pName,
                                    javax.management.ObjectName pListener,
                                    javax.management.NotificationFilter pFilter,
                                    java.lang.Object pHandback)
                             throws javax.management.InstanceNotFoundException,
                                    java.lang.UnsupportedOperationException
Throws:
java.lang.UnsupportedOperationException - The MBean related to the given object cannot be wrapped by the transport layer implementation and therefore it makes no sense (no callback could be instantiated) and therefore this exception is always thrown

removeNotificationListener

public void removeNotificationListener(javax.management.ObjectName pName,
                                       javax.management.ObjectName pListener)
                                throws javax.management.InstanceNotFoundException,
                                       javax.management.ListenerNotFoundException,
                                       java.lang.UnsupportedOperationException
Throws:
java.lang.UnsupportedOperationException - The MBean related to the given object cannot be wrapped by the transport layer which prevents the remove of the the wrapper and therefore it makes no sense (no callback could be instantiated) and therefore this exception is always thrown

deserialize

public java.io.ObjectInputStream deserialize(javax.management.ObjectName pName,
                                             byte[] pData)
                                      throws javax.management.InstanceNotFoundException,
                                             javax.management.OperationsException,
                                             java.lang.UnsupportedOperationException
Throws:
java.lang.UnsupportedOperationException - Return value is not serializable and the operation makes really no sense on a connector therefore this exception is always thrown

deserialize

public java.io.ObjectInputStream deserialize(java.lang.String pClassName,
                                             byte[] pData)
                                      throws javax.management.OperationsException,
                                             javax.management.ReflectionException,
                                             java.lang.UnsupportedOperationException
Throws:
java.lang.UnsupportedOperationException - Return value is not serializable and the operation makes really no sense on a connector therefore this exception is always thrown

deserialize

public java.io.ObjectInputStream deserialize(java.lang.String pClassName,
                                             javax.management.ObjectName pLoaderName,
                                             byte[] pData)
                                      throws javax.management.InstanceNotFoundException,
                                             javax.management.OperationsException,
                                             javax.management.ReflectionException,
                                             java.lang.UnsupportedOperationException
Throws:
java.lang.UnsupportedOperationException - Return value is not serializable and the operation makes really no sense on a connector therefore this exception is always thrown


Copyright © 2000 The JBoss Organization. All Rights Reserved.