## mx4j.tools.remote.http
Class HTTPServerInvoker

    java.lang.Object
      mx4j.tools.remote.AbstractServerInvoker
          mx4j.tools.remote.http.HTTPServerInvoker

All Implemented Interfaces:
  HTTPConnection, JMXConnection

public class HTTPServerInvoker
extends AbstractServerInvoker
implements HTTPConnection

Implementation of the HTTPConnector interface that forwards the calls to an MBeanServerConnection object. It handles remote notifications, but it does not handle unmarshalling of arguments (and all related classloading problems).

Version:
  $Revision: 1.3 $

Constructor Summary
`HTTPServerInvoker(javax.management.MBeanServerConnection server, RemoteNotificationServerHandler handler)`

Method Summary
`java.lang.Integer` `addNotificationListener(javax.management.ObjectName name, java.lang.Object filter, javax.security.auth.Subject delegate)`
`void` `close()`
`java.lang.String` `connect(java.lang.Object credentials)` This method is called when a call initiated by `JMXConnector.connect()` arrives on server side.
`javax.management.remote.NotificationResult` `fetchNotifications(long clientSequenceNumber, int maxNotifications, long timeout)`
`void` `removeNotificationListeners(javax.management.ObjectName name, java.lang.Integer[] listenerIDs, javax.security.auth.Subject delegate)`

Methods inherited from class mx4j.tools.remote.AbstractServerInvoker
`addNotificationListener, createMBean, createMBean, getAttribute, getAttributes, getDefaultDomain, getDomains, getMBeanCount, getMBeanInfo, getObjectInstance, getServer, 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`

Methods inherited from interface mx4j.tools.remote.JMXConnection
`addNotificationListener, createMBean, createMBean, getAttribute, getAttributes, getDefaultDomain, getDomains, getMBeanCount, getMBeanInfo, getObjectInstance, invoke, isInstanceOf, isRegistered, queryMBeans, queryNames, removeNotificationListener, removeNotificationListener, setAttribute, setAttributes, unregisterMBean`

Constructor Detail

### HTTPServerInvoker

    public HTTPServerInvoker(javax.management.MBeanServerConnection server,
                             RemoteNotificationServerHandler handler)

Method Detail

### connect

    public java.lang.String connect(java.lang.Object credentials)
                             throws java.io.IOException,
                                    java.lang.SecurityException

  Description copied from interface: `HTTPConnection`
  This method is called when a call initiated by `JMXConnector.connect()` arrives on server side. For HTTP connections, the socket is handled by the web container, but the remote procedure call that arrives along with the HTTP request is parsed and then (normally) forwarded to a JavaBean (that will implement this interface). Implementations of this method will normally call `ConnectionManager.connect(java.lang.Object)`.

  Specified by:
    `connect` in interface `HTTPConnection`
  Parameters:
    `credentials` - The credential for authentication
  Returns:
    The connection id for the newly created connection
  Throws:
    `java.lang.SecurityException` - If the authentication fails
    `java.io.IOException` - If a communication problem occurs

### close

    public void close()
               throws java.io.IOException

  Specified by:
    `close` in interface `JMXConnection`
  Throws:
    `java.io.IOException`

### addNotificationListener

    public java.lang.Integer addNotificationListener(javax.management.ObjectName name,
                                                     java.lang.Object filter,
                                                     javax.security.auth.Subject delegate)
                                              throws javax.management.InstanceNotFoundException,
                                                     java.io.IOException

  Specified by:
    `addNotificationListener` in interface `HTTPConnection`
  Throws:
    `javax.management.InstanceNotFoundException`
    `java.io.IOException`

### removeNotificationListeners

    public void removeNotificationListeners(javax.management.ObjectName name,
                                            java.lang.Integer[] listenerIDs,
                                            javax.security.auth.Subject delegate)
                                     throws javax.management.InstanceNotFoundException,
                                            javax.management.ListenerNotFoundException,
                                            java.io.IOException

  Specified by:
    `removeNotificationListeners` in interface `HTTPConnection`
  Throws:
    `javax.management.InstanceNotFoundException`
    `javax.management.ListenerNotFoundException`
    `java.io.IOException`

### fetchNotifications

    public javax.management.remote.NotificationResult fetchNotifications(long clientSequenceNumber,
                                                                         int maxNotifications,
                                                                         long timeout)
                                                                  throws java.io.IOException

  Specified by:
    `fetchNotifications` in interface `HTTPConnection`
  Throws:
    `java.io.IOException`

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