You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2016/10/21 08:39:11 UTC
svn commit: r1765947 -
/tomcat/tc7.0.x/trunk/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java
Author: markt
Date: Fri Oct 21 08:39:11 2016
New Revision: 1765947
URL: http://svn.apache.org/viewvc?rev=1765947&view=rev
Log:
Remove trailing whitespace for simpler diffs with later versions
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java
Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java?rev=1765947&r1=1765946&r2=1765947&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java Fri Oct 21 08:39:11 2016
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -62,9 +62,9 @@ import org.apache.tomcat.util.res.String
* properties for configuring JMX.
*/
public class JmxRemoteLifecycleListener implements LifecycleListener {
-
+
private static final Log log = LogFactory.getLog(JmxRemoteLifecycleListener.class);
-
+
protected static final StringManager sm =
StringManager.getManager(Constants.Package);
@@ -83,7 +83,7 @@ public class JmxRemoteLifecycleListener
protected boolean useLocalPorts = false;
protected JMXConnectorServer csPlatform = null;
-
+
/**
* Get the inet address on which the Platform RMI server is exported.
* @return The textual representation of inet address
@@ -108,7 +108,7 @@ public class JmxRemoteLifecycleListener
public int getRmiServerPortPlatform() {
return rmiServerPortPlatform;
}
-
+
/**
* Set the port on which the Platform RMI server is exported. This is the
* port that is normally chosen by the RMI stack.
@@ -117,7 +117,7 @@ public class JmxRemoteLifecycleListener
public void setRmiServerPortPlatform(int theRmiServerPortPlatform) {
rmiServerPortPlatform = theRmiServerPortPlatform;
}
-
+
/**
* Get the port on which the Platform RMI registry is exported.
* @return The port number
@@ -125,7 +125,7 @@ public class JmxRemoteLifecycleListener
public int getRmiRegistryPortPlatform() {
return rmiRegistryPortPlatform;
}
-
+
/**
* Set the port on which the Platform RMI registry is exported.
* @param theRmiRegistryPortPlatform The port number
@@ -133,7 +133,7 @@ public class JmxRemoteLifecycleListener
public void setRmiRegistryPortPlatform(int theRmiRegistryPortPlatform) {
rmiRegistryPortPlatform = theRmiRegistryPortPlatform;
}
-
+
/**
* Get the flag that indicates that local ports should be used for all
* connections. If using SSH tunnels, or similar, this should be set to
@@ -143,7 +143,7 @@ public class JmxRemoteLifecycleListener
public boolean getUseLocalPorts() {
return useLocalPorts;
}
-
+
/**
* Set the flag that indicates that local ports should be used for all
* connections. If using SSH tunnels, or similar, this should be set to
@@ -154,7 +154,7 @@ public class JmxRemoteLifecycleListener
public void setUseLocalPorts(boolean useLocalPorts) {
this.useLocalPorts = useLocalPorts;
}
-
+
private void init() {
// Get all the other parameters required from the standard system
// properties. Only need to get the parameters that affect the creation
@@ -194,17 +194,17 @@ public class JmxRemoteLifecycleListener
accessFile = System.getProperty(
"com.sun.management.jmxremote.access.file",
"jmxremote.access");
-
+
loginModuleName = System.getProperty(
"com.sun.management.jmxremote.login.config");
}
-
+
@Override
public void lifecycleEvent(LifecycleEvent event) {
// When the server starts, configure JMX/RMI
if (Lifecycle.START_EVENT.equals(event.getType())) {
- // Configure using standard jmx system properties
+ // Configure using standard jmx system properties
init();
// Prevent an attacker guessing the RMI object ID
@@ -250,7 +250,7 @@ public class JmxRemoteLifecycleListener
serverSsf = new RmiServerBindSocketFactory(rmiBindAddress);
}
}
-
+
// By default, the registry will pick an address to listen on.
// Setting this property overrides that and ensures it listens on
// the configured address.
@@ -283,7 +283,7 @@ public class JmxRemoteLifecycleListener
// Create the Platform server
csPlatform = createServer("Platform", rmiBindAddress, rmiRegistryPortPlatform,
rmiServerPortPlatform, env, registryCsf, registrySsf, serverCsf, serverSsf);
-
+
} else if (Lifecycle.STOP_EVENT.equals(event.getType())) {
destroyServer("Platform", csPlatform);
}
@@ -295,7 +295,7 @@ public class JmxRemoteLifecycleListener
HashMap<String,Object> theEnv,
RMIClientSocketFactory registryCsf, RMIServerSocketFactory registrySsf,
RMIClientSocketFactory serverCsf, RMIServerSocketFactory serverSsf) {
-
+
// Create the RMI registry
Registry registry;
try {
@@ -320,7 +320,7 @@ public class JmxRemoteLifecycleListener
log.error(sm.getString("jmxRemoteLifecycleListener.invalidURL", serverName, url), e);
return null;
}
-
+
RMIConnectorServer cs = null;
try {
RMIJRMPServerImpl server = new RMIJRMPServerImpl(
@@ -367,7 +367,7 @@ public class JmxRemoteLifecycleListener
private static final String FORCED_HOST = "localhost";
private RMIClientSocketFactory factory = null;
-
+
public RmiClientLocalhostSocketFactory(RMIClientSocketFactory theFactory) {
factory = theFactory;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org