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.
| Modifier and Type | Field and Description |
|---|---|
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.
|
AUTHENTICATOR| Constructor and Description |
|---|
GenericConnectorServer(Map env,
MBeanServer mbs)
Constructs a
GenericConnectorServer attached to
the given MBean server. |
| Modifier and Type | Method and Description |
|---|---|
JMXServiceURL |
getAddress() |
Map |
getAttributes() |
boolean |
isActive() |
void |
start()
Activates the connector server, that is, starts listening for
client connections.
|
void |
stop() |
connectionClosed, connectionFailed, connectionOpened, getConnectionIds, getMBeanServer, getNotificationInfo, postDeregister, postRegister, preDeregister, preRegister, setMBeanServerForwarder, toJMXConnectoraddNotificationListener, handleNotification, removeNotificationListener, removeNotificationListener, sendNotificationpublic 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.
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.
public GenericConnectorServer(Map env, MBeanServer mbs)
Constructs a GenericConnectorServer attached to
the given MBean server.
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.IllegalArgumentException - if env contains
some invalid values.public JMXServiceURL getAddress()
public Map getAttributes()
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.
IllegalStateException - if the connector server has
not been attached to an MBean server.IOException - if the connector server cannot be
started.public void stop()
throws IOException
IOExceptionpublic boolean isActive()
Copyright © 2019 Terracotta, Inc.. All rights reserved.