Interface: javax.management.remote.JMXConnectorServerMBean
- public interface JMXConnectorServerMBean
MBean interface for connector servers. A JMX API connector server is attached to an MBean server, and establishes connections to that MBean server for remote clients.
A newly-created connector server is inactive, and does not yet listen for connections. Only when its start method has been called does it start listening for connections.
Methods
-
getAddresstop
public JMXServiceURL getAddress()The address of this connector server.
The address returned may not be the exact original javax.management.remote.JMXServiceURL that was supplied when creating the connector server, since the original address may not always be complete. For example the port number may be dynamically allocated when starting the connector server. Instead the address returned is the actual javax.management.remote.JMXServiceURL of the javax.management.remote.JMXConnectorServer. This is the address that clients supply to javax.management.remote.JMXConnectorFactory.connect(javax.management.remote.JMXServiceURL).
Note that the address returned may be null if the JMXConnectorServer is not yet active.
-
getAttributestop
public Map<?> getAttributes()The attributes for this connector server.
-
getConnectionIdstop
public String[] getConnectionIds()The list of IDs for currently-open connections to this connector server.
-
isActivetop
public boolean isActive() -
setMBeanServerForwardertop
public void setMBeanServerForwarder(MBeanServerForwarder mbsf)Adds an object that intercepts requests for the MBean server that arrive through this connector server. This object will be supplied as the
MBeanServerfor any new connection created by this connector server. Existing connections are unaffected.If this connector server is already associated with an
MBeanServerobject, then that object is given to mbsf.setMBeanServer. If doing so produces an exception, this method throws the same exception without any other effect.If this connector is not already associated with an
MBeanServerobject, or if thembsf.setMBeanServercall just mentioned succeeds, thenmbsfbecomes this connector server'sMBeanServer. -
starttop
public void start() throws IOExceptionActivates 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 java.io.IOException.
-
stoptop
public void stop() throws IOExceptionDeactivates the connector server, that is, stops listening for client connections. Calling this method will also close all client connections that were made by this server. After this method returns, whether normally or with an exception, the connector server will not create any new client connections.
Once a connector server has been stopped, it cannot be started again.
Calling this method when the connector server has already been stopped has no effect. Calling this method when the connector server has not yet been started will disable the connector server object permanently.
If closing a client connection produces an exception, that exception is not thrown from this method. A javax.management.remote.JMXConnectionNotification with type javax.management.remote.JMXConnectionNotification.FAILED is emitted from this MBean with the connection ID of the connection that could not be closed.
Closing a connector server is a potentially slow operation. For example, if a client machine with an open connection has crashed, the close operation might have to wait for a network protocol timeout. Callers that do not want to block in a close operation should do it in a separate thread.
-
toJMXConnectortop
Returns a client stub for this connector server. A client stub is a serializable object whose connect method can be used to make one new connection to this connector server.
A given connector need not support the generation of client stubs. However, the connectors specified by the JMX Remote API do (JMXMP Connector and RMI Connector).
