mx4j.tools.remote.http
Class HTTPConnectionMBeanServerConnection

java.lang.Object
  extended by mx4j.tools.remote.JMXConnectionMBeanServerConnection
      extended by mx4j.tools.remote.http.HTTPConnectionMBeanServerConnection
All Implemented Interfaces:
javax.management.MBeanServerConnection

public class HTTPConnectionMBeanServerConnection
extends JMXConnectionMBeanServerConnection

Implementation of an adapter that converts MBeanServerConnection calls to HTTPConnection calls. It handles remote notifications, but it does not handle unmarshalling of arguments (and all related classloading problems). NotificationFilters are always invoked on client side.

Version:
$Revision: 1.4 $

Constructor Summary
HTTPConnectionMBeanServerConnection(JMXConnection connection, javax.security.auth.Subject delegate, RemoteNotificationClientHandler notificationHandler)
           
 
Method Summary
 void addNotificationListener(javax.management.ObjectName observed, javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback)
          Adds a NotificationListener to a registered MBean.
 void removeNotificationListener(javax.management.ObjectName observed, javax.management.NotificationListener listener)
          Removes the specified listener from the named source MBean.
 void removeNotificationListener(javax.management.ObjectName observed, javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback)
          Removes the specified listener from the named source MBean.
 
Methods inherited from class mx4j.tools.remote.JMXConnectionMBeanServerConnection
addNotificationListener, createMBean, createMBean, createMBean, createMBean, getAttribute, getAttributes, getConnection, getDefaultDomain, getDelegateSubject, getDomains, getMBeanCount, getMBeanInfo, getObjectInstance, invoke, isInstanceOf, isRegistered, queryMBeans, queryNames, removeNotificationListener, removeNotificationListener, setAttribute, setAttributes, unregisterMBean
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTTPConnectionMBeanServerConnection

public HTTPConnectionMBeanServerConnection(JMXConnection connection,
                                           javax.security.auth.Subject delegate,
                                           RemoteNotificationClientHandler notificationHandler)
Method Detail

addNotificationListener

public void addNotificationListener(javax.management.ObjectName observed,
                                    javax.management.NotificationListener listener,
                                    javax.management.NotificationFilter filter,
                                    java.lang.Object handback)
                             throws javax.management.InstanceNotFoundException,
                                    java.io.IOException
Description copied from interface: javax.management.MBeanServerConnection
Adds a NotificationListener to a registered MBean. A notification emitted by the specified source MBean will be forwarded by the MBeanServer to the given listener, if the given NotificationFilter allows so. If the filter is null, every notification will be sent to the listener. The handback object is transparently passed to the listener by the MBeanServer. The source of the notification is the source MBean ObjectName.

Parameters:
observed - The ObjectName of the source MBean on which the listener should be added.
listener - The listener which will handle the notifications emitted by the source MBean.
filter - The filter which will allow the notification to be forwarded to the listener.
handback - The context to be sent to the listener when a notification is emitted.
Throws:
javax.management.InstanceNotFoundException - If the source MBean is not registered in the MBeanServer.
java.io.IOException - If a communication problem occurred.
See Also:
MBeanServerConnection.removeNotificationListener(ObjectName, NotificationListener, NotificationFilter, Object)

removeNotificationListener

public void removeNotificationListener(javax.management.ObjectName observed,
                                       javax.management.NotificationListener listener)
                                throws javax.management.InstanceNotFoundException,
                                       javax.management.ListenerNotFoundException,
                                       java.io.IOException
Description copied from interface: javax.management.MBeanServerConnection
Removes the specified listener from the named source MBean. If the listener is registered more than once, for example with different filters or handbacks, this method will remove all those registrations.

Parameters:
observed - The ObjectName of the source MBean on which the listener should be removed.
listener - The listener to be removed.
Throws:
javax.management.InstanceNotFoundException - If the source MBean is not registered in the MBeanServer.
javax.management.ListenerNotFoundException - If the listener is not registered in the MBean.
java.io.IOException - If a communication problem occurred.
See Also:
MBeanServerConnection.addNotificationListener(ObjectName, NotificationListener, NotificationFilter, Object)

removeNotificationListener

public void removeNotificationListener(javax.management.ObjectName observed,
                                       javax.management.NotificationListener listener,
                                       javax.management.NotificationFilter filter,
                                       java.lang.Object handback)
                                throws javax.management.InstanceNotFoundException,
                                       javax.management.ListenerNotFoundException,
                                       java.io.IOException
Description copied from interface: javax.management.MBeanServerConnection
Removes the specified listener from the named source MBean. The MBean must have a listener that exactly matches the given listener, filter, and handback parameters.

Parameters:
observed - The ObjectName of the source MBean on which the listener should be removed.
listener - The listener to be removed.
filter - The filter that was specified when the listener was added.
handback - The handback that was specified when the listener was added.
Throws:
javax.management.InstanceNotFoundException - If the source MBean is not registered in the MBeanServer.
javax.management.ListenerNotFoundException - If the listener (along with filter and handback) is not registered in the MBean.
java.io.IOException - If a communication problem occurred.
See Also:
MBeanServerConnection.addNotificationListener(ObjectName, NotificationListener, NotificationFilter, Object)


Copyright © 2001-2005 The MX4J Contributors. All Rights Reserved.