amyroh 2003/11/24 15:01:22 Modified: http11/src/java/org/apache/coyote/http11 Http11Protocol.java util/java/org/apache/tomcat/util/net PoolTcpEndpoint.java Log: Add getters for all attributes defined in MBeanInfo so getAttribute calls suceed. Revision Changes Path 1.44 +143 -14 jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java Index: Http11Protocol.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java,v retrieving revision 1.43 retrieving revision 1.44 diff -u -r1.43 -r1.44 --- Http11Protocol.java 17 Nov 2003 09:42:40 -0000 1.43 +++ Http11Protocol.java 24 Nov 2003 23:01:21 -0000 1.44 @@ -264,20 +264,36 @@ // -------------------- Pool setup -------------------- + public boolean getPools(){ + return ep.isPoolOn(); + } + public void setPools( boolean t ) { ep.setPoolOn(t); setAttribute("pools", "" + t); } + public int getMaxThreads() { + return ep.getMaxThreads(); + } + public void setMaxThreads( int maxThreads ) { ep.setMaxThreads(maxThreads); setAttribute("maxThreads", "" + maxThreads); } + public int getMaxSpareThreads() { + return ep.getMaxSpareThreads(); + } + public void setMaxSpareThreads( int maxThreads ) { ep.setMaxSpareThreads(maxThreads); setAttribute("maxSpareThreads", "" + maxThreads); } + + public int getMinSpareThreads() { + return ep.getMinSpareThreads(); + } public void setMinSpareThreads( int minSpareThreads ) { ep.setMinSpareThreads(minSpareThreads); @@ -286,11 +302,19 @@ // -------------------- Tcp setup -------------------- + public int getBacklog() { + return ep.getBacklog(); + } + public void setBacklog( int i ) { ep.setBacklog(i); setAttribute("backlog", "" + i); } + public int getPort() { + return ep.getPort(); + } + public void setPort( int port ) { ep.setPort(port); setAttribute("port", "" + port); @@ -301,123 +325,223 @@ ep.setAddress( ia ); setAttribute("address", "" + ia); } - - public void setHostName( String name ) { + + // commenting out for now since it's not doing anything + //public void setHostName( String name ) { // ??? Doesn't seem to be used in existing or prev code // vhost=name; - } + //} + public String getSocketFactory() { + return socketFactoryName; + } + public void setSocketFactory( String valueS ) { socketFactoryName = valueS; setAttribute("socketFactory", valueS); } - + + public String getSSLImplementation() { + return sslImplementationName; + } + public void setSSLImplementation( String valueS) { sslImplementationName = valueS; setAttribute("sslImplementation", valueS); } + public boolean getTcpNoDelay() { + return ep.getTcpNoDelay(); + } + public void setTcpNoDelay( boolean b ) { ep.setTcpNoDelay( b ); setAttribute("tcpNoDelay", "" + b); } + public boolean getDisableUploadTimeout() { + return disableUploadTimeout; + } + public void setDisableUploadTimeout(boolean isDisabled) { disableUploadTimeout = isDisabled; } + public int getSocketBuffer() { + return socketBuffer; + } + public void setSocketBuffer(int valueI) { socketBuffer = valueI; } + public String getCompression() { + return compression; + } + public void setCompression(String valueS) { compression = valueS; setAttribute("compression", valueS); } + public int getMaxPostSize() { + return maxPostSize; + } + public void setMaxPostSize(int valueI) { maxPostSize = valueI; setAttribute("maxPostSize", "" + valueI); } + public String getRestrictedUserAgents() { + return restrictedUserAgents; + } + public void setRestrictedUserAgents(String valueS) { restrictedUserAgents = valueS; setAttribute("restrictedUserAgents", valueS); } + public String getNoCompressionUserAgents() { + return noCompressionUserAgents; + } + public void setNoCompressionUserAgents(String valueS) { noCompressionUserAgents = valueS; setAttribute("noCompressionUserAgents", valueS); } + public String getCompressableMimeType() { + return compressableMimeTypes; + } + public void setCompressableMimeType(String valueS) { compressableMimeTypes = valueS; setAttribute("compressableMimeTypes", valueS); } + public int getCompressionMinSize() { + return compressionMinSize; + } + public void setCompressionMinSize(int valueI) { compressionMinSize = valueI; setAttribute("compressionMinSize", "" + valueI); } + public int getSoLinger() { + return ep.getSoLinger(); + } public void setSoLinger( int i ) { ep.setSoLinger( i ); setAttribute("soLinger", "" + i); } + public int getSoTimeout() { + return ep.getSoTimeout(); + } + public void setSoTimeout( int i ) { ep.setSoTimeout(i); setAttribute("soTimeout", "" + i); } + public int getServerSoTimeout() { + return ep.getServerSoTimeout(); + } + public void setServerSoTimeout( int i ) { ep.setServerSoTimeout(i); setAttribute("serverSoTimeout", "" + i); } + public String getKeystore() { + return getProperty("keystore"); + } + public void setKeystore( String k ) { setAttribute("keystore", k); } + public String getKeypass() { + return getProperty("keypass"); + } + public void setKeypass( String k ) { attributes.put("keypass", k); //setAttribute("keypass", k); } - + + public String getKeytype() { + return getProperty("keystoreType"); + } + public void setKeytype( String k ) { setAttribute("keystoreType", k); } + public String getClientauth() { + return getProperty("clientauth"); + } + public void setClientauth( String k ) { setAttribute("clientauth", k); } + public String getProtocol() { + return getProperty("protocol"); + } + public void setProtocol( String k ) { setAttribute("protocol", k); } + public String getProtocols() { + return getProperty("protocols"); + } + public void setProtocols(String k) { setAttribute("protocols", k); } + public String getAlgorithm() { + return getProperty("algorithm"); + } + public void setAlgorithm( String k ) { setAttribute("algorithm", k); } + public boolean getSecure() { + return secure; + } + public void setSecure( boolean b ) { secure=b; setAttribute("secure", "" + b); } + public String getCiphers() { + return getProperty("ciphers"); + } + public void setCiphers(String ciphers) { setAttribute("ciphers", ciphers); } + public String getKeyAlias() { + return getProperty("keyAlias"); + } + public void setKeyAlias(String keyAlias) { setAttribute("keyAlias", keyAlias); } + public int getMaxKeepAliveRequests() { + return maxKeepAliveRequests; + } + /** Set the maximum number of Keep-Alive requests that we will honor. */ public void setMaxKeepAliveRequests(int mkar) { @@ -425,6 +549,10 @@ setAttribute("maxKeepAliveRequests", "" + mkar); } + public int getSocketCloseDelay() { + return socketCloseDelay; + } + public void setSocketCloseDelay( int d ) { socketCloseDelay=d; setAttribute("socketCloseDelay", "" + d); @@ -438,11 +566,19 @@ return (ServerSocketFactory)chC.newInstance(); } + public int getTimeout() { + return timeout; + } + public void setTimeout( int timeouts ) { timeout = timeouts * 1000; setAttribute("timeout", "" + timeouts); } + public String getReportedname() { + return reportedname; + } + public void setReportedname( String reportedName) { reportedname = reportedName; } @@ -638,13 +774,9 @@ } } - /* - public int getPort() { - return ep.getPort(); - } public InetAddress getAddress() { - return ep.getAddress(); + return ep.getAddress(); } public boolean isKeystoreSet() { @@ -666,13 +798,10 @@ public boolean isSecure() { return secure; } - public PoolTcpEndpoint getEndpoint() { - return ep; + return ep; } - - */ protected String domain; protected ObjectName oname; 1.28 +21 -5 jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/PoolTcpEndpoint.java Index: PoolTcpEndpoint.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/PoolTcpEndpoint.java,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- PoolTcpEndpoint.java 3 Nov 2003 21:13:01 -0000 1.27 +++ PoolTcpEndpoint.java 24 Nov 2003 23:01:21 -0000 1.28 @@ -188,11 +188,11 @@ } public int getPort() { - return port; + return port; } public void setPort(int port ) { - this.port=port; + this.port=port; } public InetAddress getAddress() { @@ -253,17 +253,33 @@ this.serverTimeout = timeout; } + public boolean getTcpNoDelay() { + return tcpNoDelay; + } + public void setTcpNoDelay( boolean b ) { tcpNoDelay=b; } + public int getSoLinger() { + return linger; + } + public void setSoLinger( int i ) { linger=i; } + public int getSoTimeout() { + return socketTimeout; + } + public void setSoTimeout( int i ) { socketTimeout=i; } + + public int getServerSoTimeout() { + return serverTimeout; + } public void setServerSoTimeout( int i ) { serverTimeout=i;
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]