| | |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013-2016 ForgeRock AS. |
| | | * Portions Copyright 2026 3A Systems, LLC. |
| | | */ |
| | | package org.opends.server.protocols.jmx; |
| | | |
| | |
| | | private final List<HostPort> listeners = new LinkedList<>(); |
| | | |
| | | /** |
| | | * The address the RMI registry and the RMI connector listen on. A change of |
| | | * listen-address takes effect when the handler restarts, as its |
| | | * configuration says: the registry, the connector and the listeners stay |
| | | * on the same address until then. |
| | | */ |
| | | private InetAddress listenAddress; |
| | | |
| | | /** |
| | | * Creates a new instance of this JMX connection handler. It must be |
| | | * initialized before it may be used. |
| | | */ |
| | |
| | | } |
| | | |
| | | listeners.clear(); |
| | | listeners.add(HostPort.allAddresses(config.getListenPort())); |
| | | listeners.add(new HostPort(listenAddress.getHostAddress(), config.getListenPort())); |
| | | |
| | | rmiConnector.finalizeConnectionHandler(portChanged); |
| | | try |
| | |
| | | |
| | | |
| | | /** |
| | | * Get the JMX connection handler's listen address. |
| | | * Get the JMX connection handler's listen address: the one it was |
| | | * initialized with, until it restarts. |
| | | * |
| | | * @return Returns the JMX connection handler's listen address. |
| | | */ |
| | | public InetAddress getListenAddress() |
| | | { |
| | | return currentConfig.getListenAddress(); |
| | | return listenAddress; |
| | | } |
| | | |
| | | /** |
| | |
| | | protocol = "JMX"; |
| | | } |
| | | |
| | | listenAddress = config.getListenAddress(); |
| | | listeners.clear(); |
| | | listeners.add(HostPort.allAddresses(config.getListenPort())); |
| | | listeners.add(new HostPort(listenAddress.getHostAddress(), config.getListenPort())); |
| | | connectionHandlerName = "JMX Connection Handler " + config.getListenPort(); |
| | | |
| | | // Create a system property to store the JMX port the server is |