javax.management.remote.generic
Class GenericConnectorServer

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

public class GenericConnectorServer
extends JMXConnectorServer

A JMX API Connector server that creates connections to remote clients. This class can use a MessageConnectionServer object to specify how connections are made.

User code does not usually instantiate this class. Instead, a JMXConnectorServerProvider should be added to the JMXConnectorServerFactory so that users can implicitly instantiate the GenericConnector (or a subclass of it) through the JMXServiceURL provided when creating it.

The specific connector protocol to be used by an instance of this class is specified by attributes in the Map passed to the constructor. The attribute MESSAGE_CONNECTION_SERVER is the standard way to define the transport. An implementation can recognize other attributes to define the transport differently.


Field Summary
static String MESSAGE_CONNECTION_SERVER
          Name of the attribute that specifies how connections are made to this connector server.
static String OBJECT_WRAPPING
          Name of the attribute that specifies the object wrapping for parameters whose deserialization requires special treatment.
 
Fields inherited from class javax.management.remote.JMXConnectorServer
AUTHENTICATOR
 
Constructor Summary
GenericConnectorServer(Map env, MBeanServer mbs)
          Constructs a GenericConnectorServer attached to the given MBean server.
 
Method Summary
 JMXServiceURL getAddress()
           
 Map getAttributes()
           
 boolean isActive()
           
 void start()
          Activates the connector server, that is, starts listening for client connections.
 void 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

OBJECT_WRAPPING

public static final String OBJECT_WRAPPING

Name of the attribute that specifies the object wrapping for parameters whose deserialization requires special treatment. The value associated with this attribute, if any, must be an object that implements the interface ObjectWrapping.

See Also:
Constant Field Values

MESSAGE_CONNECTION_SERVER

public static final String MESSAGE_CONNECTION_SERVER

Name of the attribute that specifies how connections are made to this connector server. The value associated with this attribute, if any, must be an object that implements the interface MessageConnectionServer.

See Also:
Constant Field Values
Constructor Detail

GenericConnectorServer

public GenericConnectorServer(Map env,
                              MBeanServer mbs)

Constructs a GenericConnectorServer attached to the given MBean server.

Parameters:
env - a set of attributes for the connector server. Can be null, which is equivalent to an empty map.
mbs - the local MBeanServer used to execute a remote request. Null if the MBean server will be specified by registering this connector server as an MBean in it.
Throws:
IllegalArgumentException - if env contains some invalid values.
Method Detail

getAddress

public JMXServiceURL getAddress()

getAttributes

public Map getAttributes()

start

public void start()
           throws IOException

Activates the connector server, that is, starts listening for client connections. Calling this method when the connector server is already active has no effect. Calling this method when the connector server has been stopped will generate an IOException.

Throws:
IllegalStateException - if the connector server has not been attached to an MBean server.
IOException - if the connector server cannot be started.

stop

public void stop()
          throws IOException
Throws:
IOException

isActive

public boolean isActive()

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.