javax.management.remote.jmxmp
Class JMXMPConnectorServer

java.lang.Object
  extended by javax.management.NotificationBroadcasterSupport
      extended by javax.management.remote.JMXConnectorServer
          extended by javax.management.remote.generic.GenericConnectorServer
              extended by javax.management.remote.jmxmp.JMXMPConnectorServer
All Implemented Interfaces:
MBeanRegistration, NotificationBroadcaster, NotificationEmitter, JMXConnectorServerMBean

public class JMXMPConnectorServer
extends GenericConnectorServer

A JMX API connector server that creates connections using the JMX Messaging Protocol over TCP. Rather than instantiate this class directly, it is recommended to use the JMXConnectorServerFactory with a JMXServiceURL that has protocol type jmxmp.

The address that the connector server should listen for connections on is specified with a JMXServiceURL provided to the constructor. If the host is omitted from this address, the local host is understood. If the port is omitted from this address, the connector server will listen on an unspecified available port. The getAddress method can be used to discover which port it is.

If the local machine has more than one network interface, it is possible to listen for connections on all of the interfaces, or on just one interface. By default, a connector server listens on all of the interfaces. To listen on just one, specify the address of the interface in the JMXServiceURL and supply the attribute SERVER_ADDRESS_WILDCARD with the value "false" when constructing the connector server.

In addition to any protocol-specific authentication, this connector server can verify new connections and/or modify the authenticated Subject by supplying a JMXAuthenticator using the attribute JMXConnectorServer.AUTHENTICATOR. The authenticate method will be called with a two-element Object[]. The first element is a String that is the connection id of the new connection. The second element is either null or the authenticated Subject. If the connection is accepted, the method returns the Subject to use for received requests, or null if there is none. If the connection is rejected, the method throws an exception, typically SecurityException.


Field Summary
static String SERVER_ADDRESS_WILDCARD
          Name of the attribute that specifies whether the connector server should listen for connections on all connected network interfaces, or just on the interface whose address is specified in the JMXServiceURL.
 
Fields inherited from class javax.management.remote.generic.GenericConnectorServer
MESSAGE_CONNECTION_SERVER, OBJECT_WRAPPING
 
Fields inherited from class javax.management.remote.JMXConnectorServer
AUTHENTICATOR
 
Constructor Summary
JMXMPConnectorServer()
          Creates a connector server that listens for connection requests on an unspecified port.
JMXMPConnectorServer(JMXServiceURL address, Map env)
          Creates a connector server that listens for connection requests on the given address with the given parameters.
JMXMPConnectorServer(JMXServiceURL address, Map env, MBeanServer mbs)
          Creates a connector server that listens for connection requests on the given address with the given parameters.
JMXMPConnectorServer(MBeanServer mbs)
          Creates a connector server that listens for connection requests on an unspecified port.
 
Method Summary
 
Methods inherited from class javax.management.remote.generic.GenericConnectorServer
getAddress, getAttributes, isActive, start, stop
 
Methods inherited from class javax.management.remote.JMXConnectorServer
connectionClosed, connectionFailed, connectionOpened, getConnectionIds, getMBeanServer, getNotificationInfo, postDeregister, postRegister, preDeregister, preRegister, setMBeanServerForwarder, toJMXConnector
 
Methods inherited from class javax.management.NotificationBroadcasterSupport
addNotificationListener, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVER_ADDRESS_WILDCARD

public static final String SERVER_ADDRESS_WILDCARD

Name of the attribute that specifies whether the connector server should listen for connections on all connected network interfaces, or just on the interface whose address is specified in the JMXServiceURL. The value associated with this attribute, if any, should be a string that is equal, ignoring case, to "true" or "false". The default value is true.

See Also:
Constant Field Values
Constructor Detail

JMXMPConnectorServer

public JMXMPConnectorServer()
                     throws IOException

Creates a connector server that listens for connection requests on an unspecified port. A connector server created in this way must be registered as an MBean in the MBean server that is being made available remotely.

This constructor is equivalent to JMXMPConnectorServer(null,null,null).

Throws:
IOException - if the connector server cannot be created for some reason.

JMXMPConnectorServer

public JMXMPConnectorServer(MBeanServer mbs)
                     throws IOException

Creates a connector server that listens for connection requests on an unspecified port. The MBean server that is being made available remotely is specified by the mbs parameter.

This constructor is equivalent to JMXMPConnectorServer(null,null,mbs).

Parameters:
mbs - the MBean server that is being made available remotely.
Throws:
IOException - if the connector server cannot be created for some reason.

JMXMPConnectorServer

public JMXMPConnectorServer(JMXServiceURL address,
                            Map env)
                     throws IOException

Creates a connector server that listens for connection requests on the given address with the given parameters. A connector server created in this way must be registered as an MBean in the MBean server that is being made available remotely.

This constructor is equivalent to JMXMPConnectorServer(address,env,null).

Parameters:
address - the address that the connector server will listen for connections on. If null, the connector server will listen for connections on an unspecified port of the local host name.
env - the properties of the connector server. This parameter can be null, which is equivalent to an empty Map. The supplied Map is not modified.
Throws:
IllegalArgumentException - if env contains some invalid values.
IOException - if the connector server cannot be created for some reason.

JMXMPConnectorServer

public JMXMPConnectorServer(JMXServiceURL address,
                            Map env,
                            MBeanServer mbs)
                     throws IOException

Creates a connector server that listens for connection requests on the given address with the given parameters. The MBean server that is being made available remotely is specified by the mbs parameter.

Parameters:
address - the address that the connector server will listen for connections on. If null, the connector server will listen for connections on an unspecified port of the local host name.
env - the properties of the connector server. This parameter can be null, which is equivalent to an empty Map. The supplied Map is not modified.
mbs - the MBean server that this connector server is making available remotely. Null if this connector server will be registered as an MBean in the MBean server to be made available.
Throws:
IllegalArgumentException - if env contains some invalid values.
IOException - if the connector server cannot be created for some reason.

Open Source build 02
opendmk-1.0-b02 2007.10.01_19:17:46_MEST

Copyright 1998-2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.