Author: markt Date: Fri Oct 17 11:07:47 2014 New Revision: 1632537 URL: http://svn.apache.org/r1632537 Log: CTR: Whitespace clean-up prior to proposing a patch
Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/Connector.java tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11Protocol.java Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/Connector.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/Connector.java?rev=1632537&r1=1632536&r2=1632537&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/Connector.java (original) +++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/Connector.java Fri Oct 17 11:07:47 2014 @@ -701,7 +701,7 @@ public class Connector return getProtocolHandlerClassName(); } - + /** * Set the Coyote protocol which will be used by the connector. Modified: tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java?rev=1632537&r1=1632536&r2=1632537&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java (original) +++ tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java Fri Oct 17 11:07:47 2014 @@ -14,7 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.apache.coyote.http11; import java.net.InetAddress; @@ -58,7 +57,7 @@ import org.apache.tomcat.util.res.String public class Http11NioProtocol extends AbstractProtocol implements MBeanRegistration { protected JSSEImplementation sslImplementation = null; - + public Http11NioProtocol() { cHandler = new Http11ConnectionHandler( this ); setSoLinger(Constants.DEFAULT_CONNECTION_LINGER); @@ -102,7 +101,7 @@ public class Http11NioProtocol extends A } else { return ep.setProperty(name,value); //make sure we at least try to set all properties } - + } /** @@ -128,11 +127,11 @@ public class Http11NioProtocol extends A public void init() throws Exception { ep.setName(getName()); ep.setHandler(cHandler); - + //todo, determine if we even need these ep.getSocketProperties().setRxBufSize(Math.max(ep.getSocketProperties().getRxBufSize(),getMaxHttpHeaderSize())); ep.getSocketProperties().setTxBufSize(Math.max(ep.getSocketProperties().getTxBufSize(),getMaxHttpHeaderSize())); - + try { ep.init(); sslImplementation = new JSSEImplementation(); @@ -225,7 +224,7 @@ public class Http11NioProtocol extends A private int socketCloseDelay=-1; private boolean disableUploadTimeout = true; private int socketBuffer = 9000; - + private Adapter adapter; private Http11ConnectionHandler cHandler; @@ -245,15 +244,15 @@ public class Http11NioProtocol extends A public void setPollerThreadCount(int count) { ep.setPollerThreadCount(count); } - + public int getPollerThreadCount() { return ep.getPollerThreadCount(); } - + public void setSelectorTimeout(long timeout) { ep.setSelectorTimeout(timeout); } - + public long getSelectorTimeout() { return ep.getSelectorTimeout(); } @@ -266,7 +265,7 @@ public class Http11NioProtocol extends A public void setExecutor(Executor executor) { ep.setExecutor(executor); } - + public void setUseExecutor(boolean useexec) { ep.setUseExecutor(useexec); } @@ -284,7 +283,7 @@ public class Http11NioProtocol extends A ep.setThreadPriority(threadPriority); setAttribute("threadPriority", "" + threadPriority); } - + public void setAcceptorThreadPriority(int threadPriority) { ep.setAcceptorThreadPriority(threadPriority); setAttribute("acceptorThreadPriority", "" + threadPriority); @@ -302,12 +301,12 @@ public class Http11NioProtocol extends A public int getAcceptorThreadPriority() { return ep.getAcceptorThreadPriority(); } - + public int getPollerThreadPriority() { return ep.getThreadPriority(); } - - + + public boolean getUseSendfile() { return ep.getUseSendfile(); } @@ -315,7 +314,7 @@ public class Http11NioProtocol extends A public void setUseSendfile(boolean useSendfile) { ep.setUseSendfile(useSendfile); } - + // -------------------- Tcp setup -------------------- public int getBacklog() { @@ -549,19 +548,19 @@ public class Http11NioProtocol extends A public void setKeystoreFile(String s ) { ep.setKeystoreFile(s);} public void setKeystore(String s) { setKeystoreFile(s);} public String getKeystore(){ return getKeystoreFile();} - + public String getKeyAlias() { return ep.getKeyAlias();} public void setKeyAlias(String s ) { ep.setKeyAlias(s);} - + public String getAlgorithm() { return ep.getAlgorithm();} public void setAlgorithm(String s ) { ep.setAlgorithm(s);} - + public void setClientauth(String s) {setClientAuth(s);} public String getClientauth(){ return getClientAuth();} public String getClientAuth() { return ep.getClientAuth();} public void setClientAuth(String s ) { ep.setClientAuth(s);} - + public String getKeystorePass() { return ep.getKeystorePass();} public void setKeystorePass(String s ) { ep.setKeystorePass(s);} public void setKeypass(String s) { setKeystorePass(s);} @@ -577,17 +576,17 @@ public class Http11NioProtocol extends A public String getTruststorePass(){return ep.getTruststorePass();} public void setTruststoreType(String t){ep.setTruststoreType(t);} public String getTruststoreType(){ return ep.getTruststoreType();} - - + + public String getSslProtocol() { return ep.getSslProtocol();} public void setSslProtocol(String s) { ep.setSslProtocol(s);} - + public String getCiphers() { return ep.getCiphers();} public void setCiphers(String s) { ep.setCiphers(s);} - + public boolean getSSLEnabled() { return ep.isSSLEnabled(); } public void setSSLEnabled(boolean SSLEnabled) { ep.setSSLEnabled(SSLEnabled); } - + /** * When client certificate information is presented in a form other than * instances of {@link java.security.cert.X509Certificate} it needs to be @@ -595,7 +594,7 @@ public class Http11NioProtocol extends A * provider is used to perform the conversion. For example it is used with * the AJP connectors, the HTTP APR connector and with the * {@link org.apache.catalina.valves.SSLValve}. If not specified, the - * default provider will be used. + * default provider will be used. */ protected String clientCertProvider = null; public String getClientCertProvider() { return clientCertProvider; } @@ -627,7 +626,7 @@ public class Http11NioProtocol extends A if (!result) deregister(processor); return result; } - + public Http11NioProcessor poll() { Http11NioProcessor result = super.poll(); if ( result != null ) { @@ -635,7 +634,7 @@ public class Http11NioProtocol extends A } return result; } - + public void clear() { Http11NioProcessor next = poll(); while ( next != null ) { @@ -650,11 +649,11 @@ public class Http11NioProtocol extends A Http11ConnectionHandler(Http11NioProtocol proto) { this.proto = proto; } - + public void releaseCaches() { recycledProcessors.clear(); } - + /** * Use this only if the processor is not available, otherwise use * {@link #release(NioChannel, Http11NioProcessor). @@ -678,7 +677,7 @@ public class Http11NioProtocol extends A public SocketState event(NioChannel socket, SocketStatus status) { Http11NioProcessor result = connections.get(socket); - SocketState state = SocketState.CLOSED; + SocketState state = SocketState.CLOSED; if (result != null) { if (log.isDebugEnabled()) log.debug("Http11NioProcessor.error="+result.error); // Call the appropriate event @@ -725,7 +724,7 @@ public class Http11NioProtocol extends A Http11NioProcessor processor = null; try { processor = connections.remove(socket); - + if (processor == null) { processor = recycledProcessors.poll(); } @@ -736,7 +735,7 @@ public class Http11NioProtocol extends A if (processor instanceof ActionHook) { ((ActionHook) processor).action(ActionCode.ACTION_START, null); } - + if (proto.ep.isSSLEnabled() && (proto.sslImplementation != null)) { if (socket instanceof SecureNioChannel) { SecureNioChannel ch = (SecureNioChannel)socket; @@ -792,7 +791,7 @@ public class Http11NioProtocol extends A public Http11NioProcessor createProcessor() { Http11NioProcessor processor = new Http11NioProcessor( proto.ep.getSocketProperties().getRxBufSize(), - proto.ep.getSocketProperties().getTxBufSize(), + proto.ep.getSocketProperties().getTxBufSize(), proto.maxHttpHeaderSize, proto.ep); processor.setAdapter(proto.adapter); @@ -830,7 +829,7 @@ public class Http11NioProtocol extends A } } } - + public void deregister(Http11NioProcessor processor) { if (proto.getDomain() != null) { synchronized (this) { @@ -850,7 +849,7 @@ public class Http11NioProtocol extends A } } - + protected static org.apache.juli.logging.Log log Modified: tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11Protocol.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11Protocol.java?rev=1632537&r1=1632536&r2=1632537&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11Protocol.java (original) +++ tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11Protocol.java Fri Oct 17 11:07:47 2014 @@ -78,7 +78,7 @@ public class Http11Protocol extends Abst setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY); } - + // ----------------------------------------------------------------- Fields @@ -105,7 +105,7 @@ public class Http11Protocol extends Abst protected HashMap<String, Object> attributes = new HashMap<String, Object>(); - + /** * Pass config info */ @@ -175,7 +175,7 @@ public class Http11Protocol extends Abst socketFactory.setAttribute(key, v); } } - + try { endpoint.init(); } catch (Exception ex) { @@ -258,7 +258,7 @@ public class Http11Protocol extends Abst // ------------------------------------------------------------- Properties - + /** * Processor cache. */ @@ -280,15 +280,15 @@ public class Http11Protocol extends Abst protected boolean SSLEnabled = false; public boolean isSSLEnabled() { return SSLEnabled;} - public void setSSLEnabled(boolean SSLEnabled) {this.SSLEnabled = SSLEnabled;} - + public void setSSLEnabled(boolean SSLEnabled) {this.SSLEnabled = SSLEnabled;} + /** * Name of the socket factory. */ protected String socketFactoryName = null; public String getSocketFactory() { return socketFactoryName; } public void setSocketFactory(String valueS) { socketFactoryName = valueS; } - + /** * Name of the SSL implementation. */ @@ -298,11 +298,11 @@ public class Http11Protocol extends Abst sslImplementationName = valueS; setSecure(true); } - - + + // HTTP /** - * Maximum number of requests which can be performed over a keepalive + * Maximum number of requests which can be performed over a keepalive * connection. The default is the same as for Apache HTTP Server. */ protected int maxKeepAliveRequests = 100; @@ -367,20 +367,20 @@ public class Http11Protocol extends Abst protected String compression = "off"; public String getCompression() { return compression; } public void setCompression(String valueS) { compression = valueS; } - - + + // HTTP protected String noCompressionUserAgents = null; public String getNoCompressionUserAgents() { return noCompressionUserAgents; } public void setNoCompressionUserAgents(String valueS) { noCompressionUserAgents = valueS; } - + // HTTP protected String compressableMimeTypes = "text/html,text/xml,text/plain"; public String getCompressableMimeType() { return compressableMimeTypes; } public void setCompressableMimeType(String valueS) { compressableMimeTypes = valueS; } - - + + // HTTP protected int compressionMinSize = 2048; public int getCompressionMinSize() { return compressionMinSize; } @@ -394,7 +394,7 @@ public class Http11Protocol extends Abst protected String restrictedUserAgents = null; public String getRestrictedUserAgents() { return restrictedUserAgents; } public void setRestrictedUserAgents(String valueS) { restrictedUserAgents = valueS; } - + // HTTP /** * Server header. @@ -405,7 +405,7 @@ public class Http11Protocol extends Abst public Executor getExecutor() { return endpoint.getExecutor(); } public void setExecutor(Executor executor) { endpoint.setExecutor(executor); } - + public int getMaxThreads() { return endpoint.getMaxThreads(); } public void setMaxThreads(int maxThreads) { endpoint.setMaxThreads(maxThreads); } @@ -456,7 +456,7 @@ public class Http11Protocol extends Abst /* * Note: All the following are JSSE/java.io specific attributes. */ - + public String getKeystore() { return (String) getAttribute("keystore"); } @@ -529,7 +529,7 @@ public class Http11Protocol extends Abst * provider is used to perform the conversion. For example it is used with * the AJP connectors, the HTTP APR connector and with the * {@link org.apache.catalina.valves.SSLValve}. If not specified, the - * default provider will be used. + * default provider will be used. */ protected String clientCertProvider = null; public String getClientCertProvider() { return clientCertProvider; } @@ -544,7 +544,7 @@ public class Http11Protocol extends Abst protected AtomicLong registerCount = new AtomicLong(0); protected RequestGroupInfo global = new RequestGroupInfo(); - protected ConcurrentLinkedQueue<Http11Processor> recycledProcessors = + protected ConcurrentLinkedQueue<Http11Processor> recycledProcessors = new ConcurrentLinkedQueue<Http11Processor>() { protected AtomicInteger size = new AtomicInteger(0); public boolean offer(Http11Processor processor) { @@ -560,7 +560,7 @@ public class Http11Protocol extends Abst if (!result) unregister(processor); return result; } - + public Http11Processor poll() { Http11Processor result = super.poll(); if ( result != null ) { @@ -568,7 +568,7 @@ public class Http11Protocol extends Abst } return result; } - + public void clear() { Http11Processor next = poll(); while ( next != null ) { @@ -602,7 +602,7 @@ public class Http11Protocol extends Abst } else { processor.setSSLSupport(null); } - + processor.process(socket); return false; @@ -637,7 +637,7 @@ public class Http11Protocol extends Abst } return false; } - + protected Http11Processor createProcessor() { Http11Processor processor = new Http11Processor(proto.maxHttpHeaderSize, proto.endpoint); @@ -657,7 +657,7 @@ public class Http11Protocol extends Abst register(processor); return processor; } - + protected void register(Http11Processor processor) { if (proto.getDomain() != null) { synchronized (this) { --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org