|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.management.NotificationBroadcasterSupport javax.management.remote.JMXConnectorServer javax.management.remote.generic.GenericConnectorServer javax.management.remote.jmxmp.JMXMPConnectorServer
public class JMXMPConnectorServer
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 |
---|
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.
Constructor Detail |
---|
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)
.
IOException
- if the connector server cannot be created
for some reason.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)
.
mbs
- the MBean server that is being made available
remotely.
IOException
- if the connector server cannot be created
for some reason.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)
.
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.
IllegalArgumentException
- if env contains
some invalid values.
IOException
- if the connector server cannot be created
for some reason.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.
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.
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 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |