You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by jg...@apache.org on 2007/07/25 19:36:49 UTC
svn commit: r559530 -
/geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/
Author: jgenender
Date: Wed Jul 25 10:36:48 2007
New Revision: 559530
URL: http://svn.apache.org/viewvc?view=rev&rev=559530
Log:
New connectors package and code - first pass
Added:
geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/
geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/AJP13ConnectorGBean.java
geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Ajp13Protocol.java
geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/BaseHttp11ConnectorGBean.java
geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/BaseHttp11Protocol.java
geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/CommonProtocol.java
geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/ConnectorGBean.java
geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11ConnectorGBean.java
geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11NIOConnectorGBean.java
geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11NIOProtocol.java
geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11Protocol.java
geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Https11ConnectorGBean.java
geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Https11NIOConnectorGBean.java
Added: geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/AJP13ConnectorGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/AJP13ConnectorGBean.java?view=auto&rev=559530
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/AJP13ConnectorGBean.java (added)
+++ geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/AJP13ConnectorGBean.java Wed Jul 25 10:36:48 2007
@@ -0,0 +1,179 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. 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. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.geronimo.tomcat.connector;
+
+import java.net.InetAddress;
+
+import org.apache.geronimo.gbean.GBeanInfo;
+import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.system.serverinfo.ServerInfo;
+import org.apache.geronimo.tomcat.TomcatContainer;
+
+public class AJP13ConnectorGBean extends ConnectorGBean implements Ajp13Protocol{
+
+ public AJP13ConnectorGBean(String name, String address, int port, TomcatContainer container, ServerInfo serverInfo) throws Exception {
+ super(name, "AJP/1.3", container, serverInfo);
+
+ // Default the host to listen on all address is one was not specified
+ if (address == null) {
+ address = "0.0.0.0";
+ }
+
+ // Must have a port
+ if (port == 0) {
+ throw new IllegalArgumentException("Must declare a port.");
+ }
+
+ connector.setAttribute("address", address);
+ connector.setAttribute("port", port);
+
+ }
+
+ public String getAddress() {
+ Object value = connector.getAttribute("address");
+ if (value == null) {
+ return "0.0.0.0";
+ } else if (value instanceof InetAddress) {
+ return ((InetAddress) value).getHostAddress();
+ } else
+ return value.toString();
+ }
+
+ public int getBackLog() {
+ Object value = connector.getAttribute("backLog");
+ return value == null ? 10 : Integer.parseInt(value.toString());
+ }
+
+ public int getBufferSize() {
+ Object value = connector.getAttribute("bufferSize");
+ return value == null ? 2048 : Integer.parseInt(value.toString());
+ }
+
+ public int getConnectionTimeout() {
+ Object value = connector.getAttribute("connectionTimeout");
+ return value == null ? org.apache.coyote.ajp.Constants.DEFAULT_CONNECTION_TIMEOUT : Integer.parseInt(value.toString());
+ }
+
+ public String getExecutor() {
+ return (String) connector.getAttribute("Executor");
+ }
+
+ public int getKeepAliveTimeout() {
+ Object value = connector.getAttribute("keepAliveTimeout");
+ return value == null ? getConnectionTimeout() : Integer.parseInt(value.toString());
+ }
+
+ public int getMaxThreads() {
+ Object value = connector.getAttribute("maxThreads");
+ return value == null ? 200 : Integer.parseInt(value.toString());
+ }
+
+ public int getPort() {
+ return connector.getPort();
+ }
+
+ public boolean getTcpNoDelay() {
+ Object value = connector.getAttribute("tcpNoDelay");
+ return value == null ? true : new Boolean(value.toString()).booleanValue();
+ }
+
+ public boolean getTomcatAuthentication() {
+ Object value = connector.getAttribute("tomcatAuthentication");
+ return value == null ? true : new Boolean(value.toString()).booleanValue();
+ }
+
+ public void setAddress(String address) {
+ connector.setAttribute("address", address);
+ }
+
+ public void setBackLog(int backLog) {
+ connector.setAttribute("backLog", new Integer(backLog));
+ }
+
+ public void setBufferSize(int bufferSize) {
+ connector.setAttribute("bufferSize", new Integer(bufferSize));
+ }
+
+ public void setConnectionTimeout(int connectionTimeout) {
+ connector.setAttribute("connectionTimeout", new Integer(connectionTimeout));
+ }
+
+ public void setExecutor(String executor) {
+ connector.setAttribute("executor", executor);
+ }
+
+ public void setKeepAliveTimeout(int keepAliveTimeout) {
+ connector.setAttribute("keepAliveTimeout", keepAliveTimeout);
+ }
+
+ public void setMaxThreads(int maxThreads) {
+ connector.setAttribute("maxThreads", maxThreads);
+ }
+
+ public void setPort(int port) {
+ connector.setPort(port);
+ }
+
+ public void setTcpNoDelay(boolean tcpNoDelay) {
+ connector.setAttribute("tcpNoDelay", new Boolean(tcpNoDelay));
+ }
+
+ public void setTomcatAuthentication(boolean tomcatAuthentication) {
+ connector.setAttribute("tomcatAuthentication", new Boolean(tomcatAuthentication));
+ }
+
+ public static final GBeanInfo GBEAN_INFO;
+
+ static {
+ GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic("Tomcat Connector", AJP13ConnectorGBean.class, ConnectorGBean.GBEAN_INFO);
+ infoFactory.addInterface(Http11Protocol.class,
+ new String[] {
+ //AJP Attributes
+ "address",
+ "backlog",
+ "bufferSize",
+ "connectionTimeout",
+ "executor",
+ "keepAliveTimeout",
+ "port",
+ "tcpNoDelay",
+ "tomcatAuthentication",
+ },
+ new String[] {
+ //AJP Attributes
+ "address",
+ "backlog",
+ "bufferSize",
+ "connectionTimeout",
+ "executor",
+ "keepAliveTimeout",
+ "port",
+ "tcpNoDelay",
+ "tomcatAuthentication",
+ }
+ );
+ infoFactory.setConstructor(new String[] { "name", "address", "port", "TomcatContainer", "ServerInfo"});
+ GBEAN_INFO = infoFactory.getBeanInfo();
+ }
+
+ public static GBeanInfo getGBeanInfo() {
+ return GBEAN_INFO;
+ }
+
+}
Added: geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Ajp13Protocol.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Ajp13Protocol.java?view=auto&rev=559530
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Ajp13Protocol.java (added)
+++ geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Ajp13Protocol.java Wed Jul 25 10:36:48 2007
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. 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. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.geronimo.tomcat.connector;
+
+public interface Ajp13Protocol {
+ //AJP
+ public String getAddress();
+ public void setAddress(String address);
+ public int getBackLog();
+ public void setBackLog(int backLog);
+ public int getBufferSize();
+ public void setBufferSize(int bufferSize);
+ public int getConnectionTimeout();
+ public void setConnectionTimeout(int connectionTimeout);
+ public String getExecutor();
+ public void setExecutor(String executor);
+ public int getKeepAliveTimeout();
+ public void setKeepAliveTimeout(int keepAliveTimeout);
+ public int getMaxThreads();
+ public void setMaxThreads(int maxThreads);
+ public int getPort();
+ public void setPort(int port);
+ public boolean getTcpNoDelay();
+ public void setTcpNoDelay(boolean tcpNoDelay);
+ public boolean getTomcatAuthentication();
+ public void setTomcatAuthentication(boolean tomcatAuthentication);
+}
Added: geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/BaseHttp11ConnectorGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/BaseHttp11ConnectorGBean.java?view=auto&rev=559530
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/BaseHttp11ConnectorGBean.java (added)
+++ geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/BaseHttp11ConnectorGBean.java Wed Jul 25 10:36:48 2007
@@ -0,0 +1,431 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. 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. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.geronimo.tomcat.connector;
+
+import java.net.InetAddress;
+
+import javax.management.j2ee.statistics.Stats;
+import javax.net.ssl.KeyManagerFactory;
+
+import org.apache.geronimo.gbean.GBeanInfo;
+import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.management.StatisticsProvider;
+import org.apache.geronimo.system.serverinfo.ServerInfo;
+import org.apache.geronimo.tomcat.TomcatContainer;
+import org.apache.geronimo.tomcat.stats.ConnectorStats;
+
+public class BaseHttp11ConnectorGBean extends ConnectorGBean implements Http11Protocol, StatisticsProvider {
+
+ private String keystoreFileName;
+
+ private String truststoreFileName;
+
+ private String algorithm;
+
+ // JSR77 stats
+ private ConnectorStats connStatsProvider = new ConnectorStats();
+
+ private boolean reset = true;
+
+ public BaseHttp11ConnectorGBean(String name, String protocol, String address, int port, TomcatContainer container, ServerInfo serverInfo) throws Exception {
+ super(name, protocol, container, serverInfo);
+
+ // Default the host to listen on all address is one was not specified
+ if (address == null) {
+ address = "0.0.0.0";
+ }
+
+ // Must have a port
+ if (port == 0) {
+ throw new IllegalArgumentException("Must declare a port.");
+ }
+
+ connector.setAttribute("address", address);
+ connector.setAttribute("port", port);
+
+ }
+ protected void initProtocol() {}
+
+ // Generic SSL
+ public String getAlgorithm() {
+ return algorithm;
+ }
+
+ public String getCiphers() {
+ return (String) connector.getAttribute("ciphers");
+ }
+
+ public boolean getClientAuth() {
+ Object value = connector.getAttribute("clientAuth");
+ return value == null ? false : new Boolean(value.toString()).booleanValue();
+ }
+
+ public String getKeyAlias() {
+ return (String) connector.getAttribute("keyAlias");
+ }
+
+ public String getKeystoreFile() {
+ return keystoreFileName;
+ }
+
+ public String getKeystoreType() {
+ return (String) connector.getAttribute("keystoreType");
+ }
+
+ public String getSslProtocol() {
+ return (String) connector.getAttribute("sslProtocol");
+ }
+
+ public String getTruststoreFile() {
+ return truststoreFileName;
+ }
+
+ public String getTruststoreType() {
+ return (String) connector.getAttribute("truststoreType");
+ }
+
+ public void setAlgorithm(String algorithm) {
+ this.algorithm = algorithm;
+ if ("default".equalsIgnoreCase(algorithm)) {
+ algorithm = KeyManagerFactory.getDefaultAlgorithm();
+ }
+ connector.setAttribute("algorithm", algorithm);
+ }
+
+ public void setCiphers(String ciphers) {
+ connector.setAttribute("ciphers", ciphers);
+ }
+
+ public void setClientAuth(String clientAuth) {
+ connector.setAttribute("clientAuth", new Boolean(clientAuth));
+ }
+
+ public void setKeyAlias(String keyAlias) {
+ connector.setAttribute("keyAlias", keyAlias);
+ }
+
+ public void setKeystoreFile(String keystoreFile) {
+ keystoreFileName = keystoreFile;
+ connector.setAttribute("keystoreFile", serverInfo.resolveServerPath(keystoreFileName));
+ }
+
+ public void setKeystorePass(String keystorePass) {
+ connector.setAttribute("keystorePass", keystorePass);
+ }
+
+ public void setKeystoreType(String keystoreType) {
+ connector.setAttribute("keystoreType", keystoreType);
+ }
+
+ public void setSslProtocol(String sslProtocol) {
+ connector.setAttribute("sslProtocol", sslProtocol);
+ }
+
+ public void setTruststoreFile(String truststoreFile) {
+ truststoreFileName = truststoreFile;
+ connector.setAttribute("truststoreFile", serverInfo.resolveServerPath(truststoreFileName));
+ }
+
+ public void setTruststorePass(String truststorePass) {
+ connector.setAttribute("truststorePass", truststorePass);
+ }
+
+ public void setTruststoreType(String truststoreType) {
+ connector.setAttribute("truststoreType", truststoreType);
+ }
+
+ // Generic HTTP
+ public int getAcceptCount() {
+ Object value = connector.getAttribute("acceptCount");
+ return value == null ? 10 : Integer.parseInt(value.toString());
+ }
+
+ public String getAddress() {
+ Object value = connector.getAttribute("address");
+ if (value == null) {
+ return "0.0.0.0";
+ } else if (value instanceof InetAddress) {
+ return ((InetAddress) value).getHostAddress();
+ } else
+ return value.toString();
+ }
+
+ public int getBufferSize() {
+ Object value = connector.getAttribute("bufferSize");
+ return value == null ? 2048 : Integer.parseInt(value.toString());
+ }
+
+ public String getCompressableMimeType() {
+ return (String) connector.getAttribute("compressableMimeType");
+ }
+
+ public String getCompression() {
+ return (String) connector.getAttribute("compression");
+ }
+
+ public int getConnectionLinger() {
+ Object value = connector.getAttribute("connectionLinger");
+ return value == null ? -1 : Integer.parseInt(value.toString());
+ }
+
+ public int getConnectionTimeout() {
+ Object value = connector.getAttribute("connectionTimeout");
+ return value == null ? 60000 : Integer.parseInt(value.toString());
+ }
+
+ public boolean getDisableUploadTimeout() {
+ Object value = connector.getAttribute("disableUploadTimeout");
+ return value == null ? true : new Boolean(value.toString()).booleanValue();
+ }
+
+ public String getExecutor() {
+ return (String) connector.getAttribute("Executor");
+ }
+
+ public int getKeepAliveTimeout() {
+ Object value = connector.getAttribute("keepAliveTimeout");
+ return value == null ? getConnectionTimeout() : Integer.parseInt(value.toString());
+ }
+
+ public int getMaxHttpHeaderSize() {
+ Object value = connector.getAttribute("maxHttpHeaderSize");
+ return value == null ? 4096 : Integer.parseInt(value.toString());
+ }
+
+ public int getMaxKeepAliveRequests() {
+ Object value = connector.getAttribute("maxKeepAliveRequests");
+ return value == null ? 100 : Integer.parseInt(value.toString());
+ }
+
+ public int getMaxThreads() {
+ Object value = connector.getAttribute("maxThreads");
+ return value == null ? 200 : Integer.parseInt(value.toString());
+ }
+
+ public String getNoCompressionUserAgents() {
+ return (String) connector.getAttribute("noCompressionUserAgents");
+ }
+
+ public int getPort() {
+ return connector.getPort();
+ }
+
+ public String getRestrictedUserAgents() {
+ return (String) connector.getAttribute("restrictedUserAgents");
+ }
+
+ public String getServer() {
+ return (String) connector.getAttribute("server");
+ }
+
+ public int getSocketBuffer() {
+ Object value = connector.getAttribute("socketBuffer");
+ return value == null ? 9000 : Integer.parseInt(value.toString());
+ }
+
+ public boolean getTcpNoDelay() {
+ Object value = connector.getAttribute("tcpNoDelay");
+ return value == null ? true : new Boolean(value.toString()).booleanValue();
+ }
+
+ public int getThreadPriority() {
+ Object value = connector.getAttribute("threadPriority");
+ return value == null ? Thread.NORM_PRIORITY : Integer.parseInt(value.toString());
+ }
+
+ public void setAcceptCount(int acceptCount) {
+ connector.setAttribute("acceptCount", new Integer(acceptCount));
+ }
+
+ public void setAddress(String address) {
+ connector.setAttribute("address", address);
+ }
+
+ public void setBufferSize(int bufferSize) {
+ connector.setAttribute("bufferSize", new Integer(bufferSize));
+ }
+
+ public void setCompressableMimeType(int compressableMimeType) {
+ connector.setAttribute("compressableMimeType", compressableMimeType);
+ }
+
+ public void setCompression(String compression) {
+ connector.setAttribute("compression", compression);
+ }
+
+ public void setConnectionLinger(int connectionLinger) {
+ connector.setAttribute("connectionLinger", new Integer(connectionLinger));
+ }
+
+ public void setConnectionTimeout(int connectionTimeout) {
+ connector.setAttribute("connectionTimeout", new Integer(connectionTimeout));
+ }
+
+ public void setDisableUploadTimeout(boolean disableUploadTimeout) {
+ connector.setAttribute("disableUploadTimeout", new Boolean(disableUploadTimeout));
+ }
+
+ public void setExecutor(String executor) {
+ connector.setAttribute("executor", executor);
+ }
+
+ public void setKeepAliveTimeout(int keepAliveTimeout) {
+ connector.setAttribute("keepAliveTimeout", keepAliveTimeout);
+ }
+
+ public void setMaxHttpHeaderSize(int maxHttpHeaderSize) {
+ connector.setAttribute("maxHttpHeaderSize", new Integer(maxHttpHeaderSize));
+ }
+
+ public void setMaxKeepAliveRequests(int maxKeepAliveRequests) {
+ connector.setAttribute("maxKeepAliveRequests", new Integer(maxKeepAliveRequests));
+ }
+
+ public void setMaxThreads(int maxThreads) {
+ connector.setAttribute("maxThreads", new Integer(maxThreads));
+ }
+
+ public void setNoCompressionUserAgents(String noCompressionUserAgents) {
+ connector.setAttribute("noCompressionUserAgents", noCompressionUserAgents);
+ }
+
+ public void setPort(int port) {
+ connector.setPort(port);
+ }
+
+ public void setRestrictedUserAgents(String restrictedUserAgents) {
+ connector.setAttribute("restrictedUserAgents", restrictedUserAgents);
+ }
+
+ public void setServer(String server) {
+ connector.setAttribute("server", server);
+ }
+
+ public void setSocketBuffer(int socketBuffer) {
+ connector.setAttribute("socketBuffer", new Integer(socketBuffer));
+ }
+
+ public void setTcpNoDelay(boolean tcpNoDelay) {
+ connector.setAttribute("tcpNoDelay", new Boolean(tcpNoDelay));
+ }
+
+ public void setThreadPriority(int threadPriority) {
+ connector.setAttribute("threadPriority", new Integer(threadPriority));
+ }
+
+ // Statistics Provider
+
+ public Stats getStats() {
+ String port = String.valueOf(getPort());
+ if (reset) {
+ reset = false;
+ return connStatsProvider.getStats(port);
+ } else
+ return connStatsProvider.updateStats(port);
+ }
+
+ public void resetStats() {
+ reset = true;
+ }
+
+ public static final GBeanInfo GBEAN_INFO;
+
+ static {
+ GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic("Tomcat Connector", BaseHttp11ConnectorGBean.class, ConnectorGBean.GBEAN_INFO);
+ infoFactory.addInterface(Http11Protocol.class,
+ new String[] {
+ //HTTP Attributes
+ "acceptCount",
+ "address",
+ "bufferSize",
+ "compressableMimeType",
+ "compression",
+ "connectionLinger",
+ "connectionTimeout",
+ "executor",
+ "keepAliveTimeout",
+ "disableUploadTimeout",
+ "maxHttpHeaderSize",
+ "maxKeepAliveRequests",
+ "maxThreads",
+ "noCompressionUserAgents",
+ "port",
+ "restrictedUserAgents",
+ "server",
+ "socketBuffer",
+ "tcpNoDelay",
+ "threadPriority",
+ //SSL Attributes
+ "algorithm",
+ "clientAuth",
+ "keystoreFile",
+ "keystorePass",
+ "keystoreType",
+ "sslProtocol",
+ "ciphers",
+ "keyAlias",
+ "truststoreFile",
+ "truststorePass",
+ "truststoreType"
+ },
+ new String[] {
+ //HTTP Attributes
+ "acceptCount",
+ "address",
+ "bufferSize",
+ "compressableMimeType",
+ "compression",
+ "connectionLinger",
+ "connectionTimeout",
+ "executor",
+ "keepAliveTimeout",
+ "disableUploadTimeout",
+ "maxHttpHeaderSize",
+ "maxKeepAliveRequests",
+ "maxThreads",
+ "noCompressionUserAgents",
+ "port",
+ "restrictedUserAgents",
+ "server",
+ "socketBuffer",
+ "tcpNoDelay",
+ "threadPriority",
+ //SSL Attributes
+ "algorithm",
+ "clientAuth",
+ "keystoreFile",
+ "keystorePass",
+ "keystoreType",
+ "sslProtocol",
+ "ciphers",
+ "keyAlias",
+ "truststoreFile",
+ "truststorePass",
+ "truststoreType"
+ }
+ );
+ infoFactory.setConstructor(new String[] { "name", "protocol", "address", "port", "TomcatContainer", "ServerInfo"});
+ GBEAN_INFO = infoFactory.getBeanInfo();
+ }
+
+ public static GBeanInfo getGBeanInfo() {
+ return GBEAN_INFO;
+ }
+
+}
Added: geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/BaseHttp11Protocol.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/BaseHttp11Protocol.java?view=auto&rev=559530
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/BaseHttp11Protocol.java (added)
+++ geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/BaseHttp11Protocol.java Wed Jul 25 10:36:48 2007
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. 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. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.geronimo.tomcat.connector;
+
+public interface BaseHttp11Protocol {
+ //Http
+ public int getAcceptCount();
+ public void setAcceptCount(int acceptCount);
+ public String getAddress();
+ public void setAddress(String address);
+ public int getBufferSize();
+ public void setBufferSize(int bufferSize);
+ public String getCompressableMimeType();
+ public void setCompressableMimeType(int compressableMimeType);
+ public String getCompression();
+ public void setCompression(String compression);
+ public int getConnectionLinger();
+ public void setConnectionLinger(int connectionLinger);
+ public int getConnectionTimeout();
+ public void setConnectionTimeout(int connectionTimeout);
+ public String getExecutor();
+ public void setExecutor(String executor);
+ public int getKeepAliveTimeout();
+ public void setKeepAliveTimeout(int keepAliveTimeout);
+ public boolean getDisableUploadTimeout();
+ public void setDisableUploadTimeout(boolean disableUploadTimeout);
+ public int getMaxHttpHeaderSize();
+ public void setMaxHttpHeaderSize(int maxHttpHeaderSize);
+ public int getMaxKeepAliveRequests();
+ public void setMaxKeepAliveRequests(int maxKeepAliveRequests);
+ public int getMaxThreads();
+ public void setMaxThreads(int maxThreads);
+ public String getNoCompressionUserAgents();
+ public void setNoCompressionUserAgents(String noCompressionUserAgents);
+ public int getPort();
+ public void setPort(int port);
+ public String getRestrictedUserAgents();
+ public void setRestrictedUserAgents(String restrictedUserAgents);
+ public String getServer();
+ public void setServer(String server);
+ public int getSocketBuffer();
+ public void setSocketBuffer(int socketBuffer);
+ public boolean getTcpNoDelay();
+ public void setTcpNoDelay(boolean tcpNoDelay);
+ public int getThreadPriority();
+ public void setThreadPriority(int threadPriority);
+
+}
Added: geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/CommonProtocol.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/CommonProtocol.java?view=auto&rev=559530
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/CommonProtocol.java (added)
+++ geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/CommonProtocol.java Wed Jul 25 10:36:48 2007
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. 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 get distributed on an
+ * "AS get" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.geronimo.tomcat.connector;
+
+public interface CommonProtocol {
+ public boolean getAllowTrace();
+ public void setAllowTrace(boolean allowTrace);
+ public boolean getEmptySessionPath();
+ public void setEmptySessionPath(boolean emptySessionPath);
+ public boolean getEnableLookups();
+ public void setEnableLookups(boolean enableLookups);
+ public int getMaxPostSize();
+ public void setMaxPostSize(int bytes);
+ public int getMaxSavePostSize();
+ public void setMaxSavePostSize(int maxPostSize);
+ public String getProtocol();
+ public String getProxyName();
+ public void setProxyName(String proxyName);
+ public int getProxyPort();
+ public void setProxyPort(int port);
+ public int getRedirectPort();
+ public void setRedirectPort(int port);
+ public void setScheme(String scheme);
+ public String getScheme();
+ public boolean getSecure();
+ public void setSecure(boolean secure);
+ public boolean getSslEnabled();
+ public void setSslEnabled(boolean sslEnabled);
+ public void setUriEncoding(String uriEncoding);
+ public String getUriEncoding();
+ public boolean getUseBodyEncodingForURI();
+ public void setUseBodyEncodingForURI(boolean useBodyEncodingForURI);
+ public void setUseIPVHosts(boolean useIPVHosts);
+ public boolean getUseIPVHosts();
+ public void setXpoweredBy(boolean xpoweredBy);
+ public boolean getXpoweredBy();
+}
Added: geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/ConnectorGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/ConnectorGBean.java?view=auto&rev=559530
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/ConnectorGBean.java (added)
+++ geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/ConnectorGBean.java Wed Jul 25 10:36:48 2007
@@ -0,0 +1,302 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. 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. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.geronimo.tomcat.connector;
+
+import org.apache.catalina.LifecycleException;
+import org.apache.catalina.connector.Connector;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.geronimo.gbean.GBeanInfo;
+import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.gbean.GBeanLifecycle;
+import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
+import org.apache.geronimo.management.geronimo.WebManager;
+import org.apache.geronimo.system.serverinfo.ServerInfo;
+import org.apache.geronimo.tomcat.BaseGBean;
+import org.apache.geronimo.tomcat.ObjectRetriever;
+import org.apache.geronimo.tomcat.TomcatContainer;
+
+public class ConnectorGBean extends BaseGBean implements GBeanLifecycle, ObjectRetriever, CommonProtocol {
+
+ private static final Log log = LogFactory.getLog(ConnectorGBean.class);
+
+ public final static String CONNECTOR_CONTAINER_REFERENCE = "TomcatContainer";
+
+ protected final ServerInfo serverInfo;
+
+ protected final Connector connector;
+
+ private final TomcatContainer container;
+
+ private String name;
+
+ public ConnectorGBean(String name, String protocol, TomcatContainer container, ServerInfo serverInfo) throws Exception {
+ super();
+
+ // Do we really need this?? For Tomcat I don't think so...
+ // validateProtocol(protocol);
+
+ if (name == null) {
+ throw new IllegalArgumentException("name cannot be null.");
+ }
+
+ if (container == null) {
+ throw new IllegalArgumentException("container cannot be null.");
+ }
+
+ if (serverInfo == null){
+ throw new IllegalArgumentException("serverInfo cannot be null.");
+ }
+
+ initProtocol();
+
+ this.name = name;
+ this.container = container;
+ this.serverInfo = serverInfo;
+
+ // Create the Connector object
+ connector = new Connector(protocol);
+
+ }
+
+ public void doFail() {
+ log.warn(name + " connector failed");
+ doStop();
+ }
+
+ public void doStart() throws LifecycleException {
+ container.addConnector(connector);
+ connector.start();
+ if (log.isDebugEnabled())
+ log.debug(name + " connector started");
+ }
+
+ public void doStop() {
+ try {
+ connector.stop();
+ } catch (LifecycleException e) {
+ log.error(e);
+ }
+
+ container.removeConnector(connector);
+
+ if (log.isDebugEnabled())
+ log.debug(name + " connector stopped");
+ }
+
+ /**
+ * Ensures that this implementation can handle the requested protocol.
+ * @param protocol
+ */
+ protected void initProtocol() {}
+
+ public Object getInternalObject() {
+ return connector;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setAllowTrace(boolean allow) {
+ connector.setAllowTrace(allow);
+ }
+
+ public boolean getAllowTrace() {
+ return connector.getAllowTrace();
+ }
+
+ public void setEmptySessionPath(boolean emptySessionPath) {
+ connector.setEmptySessionPath(emptySessionPath);
+ }
+
+ public void setEnableLookups(boolean enabled) {
+ connector.setEnableLookups(enabled);
+ }
+
+ public int getMaxPostSize() {
+ int value = connector.getMaxPostSize();
+ return value == 0 ? 2097152 : value;
+ }
+
+ public void setMaxPostSize(int bytes) {
+ connector.setMaxPostSize(bytes);
+ }
+
+ public String getProtocol() {
+ return connector.getProtocol();
+ }
+
+ public String getProxyName() {
+ return connector.getProxyName();
+ }
+
+ public int getProxyPort() {
+ return connector.getProxyPort();
+ }
+
+ public int getRedirectPort() {
+ return connector.getRedirectPort();
+ }
+
+ public String getScheme() {
+ return connector.getScheme();
+ }
+
+ public boolean getSecure() {
+ return connector.getSecure();
+ }
+
+ public String getUriEncoding() {
+ return connector.getURIEncoding();
+ }
+
+ public boolean getUseBodyEncodingForURI() {
+ return connector.getUseBodyEncodingForURI();
+ }
+
+ public boolean getUseIPVHosts() {
+ return connector.getUseIPVHosts();
+ }
+
+ public void setMaxSavePostSize(int maxSavePostSize) {
+ connector.setMaxSavePostSize(maxSavePostSize);
+ }
+
+ public void setProxyName(String proxyName) {
+ connector.setProxyName(proxyName);
+ }
+
+ public void setProxyPort(int port) {
+ connector.setProxyPort(port);
+ }
+
+ public void setRedirectPort(int port) {
+ connector.setRedirectPort(port);
+ }
+
+ public void setScheme(String scheme) {
+ connector.setScheme(scheme);
+ }
+
+ public void setSecure(boolean secure) {
+ connector.setSecure(secure);
+ }
+
+ public boolean getSslEnabled() {
+ Object value = connector.getAttribute("SSLEnabled");
+ return value == null ? false : new Boolean(value.toString()).booleanValue();
+ }
+
+ public void setSslEnabled(boolean sslEnabled) {
+ connector.setAttribute("SSLEnabled", sslEnabled);
+ }
+
+ public void setUriEncoding(String uriEncoding) {
+ connector.setURIEncoding(uriEncoding);
+ }
+
+ public void setUseBodyEncodingForURI(boolean useBodyEncodingForURI) {
+ connector.setUseBodyEncodingForURI(useBodyEncodingForURI);
+ }
+
+ public void setUseIPVHosts(boolean useIPVHosts) {
+ connector.setUseIPVHosts(useIPVHosts);
+ }
+
+ public void setXpoweredBy(boolean xpoweredBy) {
+ connector.setXpoweredBy(xpoweredBy);
+ }
+
+ public boolean getEnableLookups() {
+ return connector.getEnableLookups();
+ }
+
+ public int getMaxSavePostSize() {
+ int value = connector.getMaxSavePostSize();
+ return value == 0 ? 4096 : value;
+ }
+
+ public boolean getEmptySessionPath() {
+ return connector.getEmptySessionPath();
+ }
+
+ public boolean getXpoweredBy() {
+ return connector.getXpoweredBy();
+ }
+
+ public static final GBeanInfo GBEAN_INFO;
+
+ static {
+ GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic("Tomcat Connector", ConnectorGBean.class);
+
+ infoFactory.addAttribute("name", String.class, true);
+ infoFactory.addAttribute("protocol", String.class, true);
+ infoFactory.addReference(CONNECTOR_CONTAINER_REFERENCE, TomcatContainer.class, NameFactory.GERONIMO_SERVICE);
+ infoFactory.addReference("ServerInfo", ServerInfo.class, "GBean");
+ infoFactory.addInterface(ObjectRetriever.class);
+ infoFactory.addInterface(CommonProtocol.class,
+
+ new String[]{
+ "allowTrace",
+ "emptySessionPath",
+ "enableLookups",
+ "maxPostSize",
+ "maxSavePostSize",
+ "protocol",
+ "proxyName",
+ "proxyPort",
+ "redirectPort",
+ "scheme",
+ "secure",
+ "sslEnabled",
+ "uriEncoding",
+ "useBodyEncodingForURI",
+ "useIPVHosts",
+ "xpoweredBy"
+ },
+
+ new String[]{
+ "allowTrace",
+ "emptySessionPath",
+ "enableLookups",
+ "maxPostSize",
+ "maxSavePostSize",
+ "protocol",
+ "proxyName",
+ "proxyPort",
+ "redirectPort",
+ "scheme",
+ "secure",
+ "sslEnabled",
+ "uriEncoding",
+ "useBodyEncodingForURI",
+ "useIPVHosts",
+ "xpoweredBy"
+ }
+ );
+ infoFactory.setConstructor(new String[] { "name", "protocol", "TomcatContainer", "ServerInfo" });
+ GBEAN_INFO = infoFactory.getBeanInfo();
+ }
+
+ public static GBeanInfo getGBeanInfo() {
+ return GBEAN_INFO;
+ }
+
+}
Added: geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11ConnectorGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11ConnectorGBean.java?view=auto&rev=559530
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11ConnectorGBean.java (added)
+++ geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11ConnectorGBean.java Wed Jul 25 10:36:48 2007
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. 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. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.geronimo.tomcat.connector;
+
+import org.apache.geronimo.gbean.GBeanInfo;
+import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.system.serverinfo.ServerInfo;
+import org.apache.geronimo.tomcat.TomcatContainer;
+
+public class Http11ConnectorGBean extends BaseHttp11ConnectorGBean {
+
+ public Http11ConnectorGBean(String name, String address, int port, TomcatContainer container, ServerInfo serverInfo) throws Exception {
+ super(name, "HTTP/1.1", address, port, container, serverInfo);
+ }
+
+ public static final GBeanInfo GBEAN_INFO;
+
+ static {
+ GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic("Tomcat Connector", Http11ConnectorGBean.class, BaseHttp11ConnectorGBean.GBEAN_INFO);
+ infoFactory.setConstructor(new String[] { "name", "address", "port", "TomcatContainer", "ServerInfo"});
+ GBEAN_INFO = infoFactory.getBeanInfo();
+ }
+
+ public static GBeanInfo getGBeanInfo() {
+ return GBEAN_INFO;
+ }
+}
Added: geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11NIOConnectorGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11NIOConnectorGBean.java?view=auto&rev=559530
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11NIOConnectorGBean.java (added)
+++ geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11NIOConnectorGBean.java Wed Jul 25 10:36:48 2007
@@ -0,0 +1,422 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. 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. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.geronimo.tomcat.connector;
+
+import org.apache.geronimo.gbean.GBeanInfo;
+import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.system.serverinfo.ServerInfo;
+import org.apache.geronimo.tomcat.TomcatContainer;
+
+public class Http11NIOConnectorGBean extends BaseHttp11ConnectorGBean implements Http11NIOProtocol{
+
+ public Http11NIOConnectorGBean(String name, String address, int port, TomcatContainer container, ServerInfo serverInfo) throws Exception {
+ super(name, "org.apache.coyote.http11.Http11NioProtocol", address, port, container, serverInfo);
+ }
+
+ public int getAcceptorThreadCount() {
+ Object value = connector.getAttribute("acceptorThreadCount");
+ return value == null ? 1 : Integer.parseInt(value.toString());
+ }
+
+ public int getAcceptorThreadPriority() {
+ Object value = connector.getAttribute("acceptorThreadCount");
+ return value == null ? Thread.NORM_PRIORITY : Integer.parseInt(value.toString());
+ }
+
+ public boolean getCommand_line_options() {
+ Object value = connector.getAttribute("command-line-options");
+ return value == null ? true : new Boolean(value.toString()).booleanValue();
+ }
+
+ public int getOomParachute() {
+ Object value = connector.getAttribute("oomParachute");
+ return value == null ? 1048576 : Integer.parseInt(value.toString());
+ }
+
+ public int getPollerThreadCount() {
+ Object value = connector.getAttribute("pollerThreadCount");
+ return value == null ? 1 : Integer.parseInt(value.toString());
+ }
+
+ public int getPollerThreadPriority() {
+ Object value = connector.getAttribute("pollerThreadCount");
+ return value == null ? Thread.NORM_PRIORITY : Integer.parseInt(value.toString());
+ }
+
+ public int getProcessCache() {
+ Object value = connector.getAttribute("processCache");
+ return value == null ? 200 : Integer.parseInt(value.toString());
+ }
+
+ public int getSelectorPool_maxSelectors() {
+ Object value = connector.getAttribute("selectorPool.maxSelectors");
+ return value == null ? 200 : Integer.parseInt(value.toString());
+ }
+
+ public int getSelectorPool_maxSpareSelectors() {
+ Object value = connector.getAttribute("selectorPool.maxSpareSelectors");
+ return value == null ? -1 : Integer.parseInt(value.toString());
+ }
+
+ public int getSelectorTimeout() {
+ Object value = connector.getAttribute("selectorTimeout");
+ return value == null ? 1000 : Integer.parseInt(value.toString());
+ }
+
+ public int getSocket_appReadBufSize() {
+ Object value = connector.getAttribute("socket.appReadBufSize");
+ return value == null ? 8192 : Integer.parseInt(value.toString());
+ }
+
+ public int getSocket_appWriteBufSize() {
+ Object value = connector.getAttribute("socket.appWriteBufSize");
+ return value == null ? 8192 : Integer.parseInt(value.toString());
+ }
+
+ public int getSocket_bufferPool() {
+ Object value = connector.getAttribute("socket.bufferPool");
+ return value == null ? 500 : Integer.parseInt(value.toString());
+ }
+
+ public int getSocket_bufferPoolSize() {
+ Object value = connector.getAttribute("socket.bufferPoolSize");
+ return value == null ? 104857600 : Integer.parseInt(value.toString());
+ }
+
+ public boolean getSocket_directBuffer() {
+ Object value = connector.getAttribute("socket.directBuffer");
+ return value == null ? false : new Boolean(value.toString()).booleanValue();
+ }
+
+ public int getSocket_eventCache() {
+ Object value = connector.getAttribute("socket.eventCache");
+ return value == null ? 500 : Integer.parseInt(value.toString());
+ }
+
+ public int getSocket_keyCache() {
+ Object value = connector.getAttribute("socket.keyCache");
+ return value == null ? 500 : Integer.parseInt(value.toString());
+ }
+
+ public boolean getSocket_ooBInline() {
+ Object value = connector.getAttribute("socket.ooBInline");
+ return value == null ? true : new Boolean(value.toString()).booleanValue();
+ }
+
+ public int getSocket_performanceBandwidth() {
+ Object value = connector.getAttribute("socket.performanceBandwidth");
+ return value == null ? 1 : Integer.parseInt(value.toString());
+ }
+
+ public int getSocket_performanceConnectionTime() {
+ Object value = connector.getAttribute("socket.performanceConnectionTime");
+ return value == null ? 1 : Integer.parseInt(value.toString());
+ }
+
+ public int getSocket_performanceLatency() {
+ Object value = connector.getAttribute("socket.performanceLatency");
+ return value == null ? 0 : Integer.parseInt(value.toString());
+ }
+
+ public int getSocket_processorCache() {
+ Object value = connector.getAttribute("socket.processorCache");
+ return value == null ? 500 : Integer.parseInt(value.toString());
+ }
+
+ public int getSocket_rxBufSize() {
+ Object value = connector.getAttribute("socket.rxBufSize");
+ return value == null ? 25188 : Integer.parseInt(value.toString());
+ }
+
+ public boolean getSocket_soKeepAlive() {
+ Object value = connector.getAttribute("socket.soKeepAlive");
+ return value == null ? false : new Boolean(value.toString()).booleanValue();
+ }
+
+ public boolean getSocket_soLingerOn() {
+ Object value = connector.getAttribute("socket.soLingerOn");
+ return value == null ? true : new Boolean(value.toString()).booleanValue();
+ }
+
+ public int getSocket_soLingerTime() {
+ Object value = connector.getAttribute("socket.soLingerTime");
+ return value == null ? 25 : Integer.parseInt(value.toString());
+ }
+
+ public boolean getSocket_soReuseAddress() {
+ Object value = connector.getAttribute("socket.soReuseAddress");
+ return value == null ? true : new Boolean(value.toString()).booleanValue();
+ }
+
+ public int getSocket_soTimeout() {
+ Object value = connector.getAttribute("socket.soTimeout");
+ return value == null ? 5000 : Integer.parseInt(value.toString());
+ }
+
+ public byte getSocket_soTrafficClass() {
+ Object value = connector.getAttribute("socket.soTrafficClass");
+ return value == null ? (0x04 | 0x08 | 0x010) : new Byte(value.toString()).byteValue();
+ }
+
+ public boolean getSocket_tcpNoDelay() {
+ Object value = connector.getAttribute("socket.tcpNoDelay");
+ return value == null ? false : new Boolean(value.toString()).booleanValue();
+ }
+
+ public int getSocket_txBufSize() {
+ Object value = connector.getAttribute("socket.txBufSize");
+ return value == null ? 43800 : Integer.parseInt(value.toString());
+ }
+
+ public boolean getUseComet() {
+ Object value = connector.getAttribute("useComet");
+ return value == null ? true : new Boolean(value.toString()).booleanValue();
+ }
+
+ public boolean getUseExecutor() {
+ Object value = connector.getAttribute("useExecutor");
+ return value == null ? true : new Boolean(value.toString()).booleanValue();
+ }
+
+ public boolean getUseSendFile() {
+ Object value = connector.getAttribute("useSendFile");
+ return value == null ? true : new Boolean(value.toString()).booleanValue();
+ }
+
+ public void setAcceptorThreadCount(int acceptorThreadCount) {
+ connector.setAttribute("acceptorThreadCount", new Integer(acceptorThreadCount));
+ }
+
+ public void setAcceptorThreadPriority(int acceptorThreadPriority) {
+ connector.setAttribute("acceptorThreadPriority", new Integer(acceptorThreadPriority));
+ }
+
+ public void setCommand_line_options(boolean command_line_options) {
+ connector.setAttribute("command-line-options", new Boolean(command_line_options));
+ }
+
+ public void setOomParachute(int oomParachute) {
+ connector.setAttribute("oomParachute", new Integer(oomParachute));
+ }
+
+ public void setPollerThreadCount(int pollerThreadCount) {
+ connector.setAttribute("pollerThreadCount", new Integer(pollerThreadCount));
+ }
+
+ public void setPollerThreadPriority(int pollerThreadPriority) {
+ connector.setAttribute("pollerThreadPriority", new Integer(pollerThreadPriority));
+ }
+
+ public void setProcessCache(int processCache) {
+ connector.setAttribute("processCache", new Integer(processCache));
+ }
+
+ public void setSelectorPool_maxSelectors(int selectorPool_maxSelectors) {
+ connector.setAttribute("selectorPool.maxSelectors", new Integer(selectorPool_maxSelectors));
+ }
+
+ public void setSelectorPool_maxSpareSelectors(int selectorPool_maxSpareSelectors) {
+ connector.setAttribute("selectorPool.maxSpareSelectors", new Integer(selectorPool_maxSpareSelectors));
+ }
+
+ public void setSelectorTimeout(int selectorTimeout) {
+ connector.setAttribute("selectorTimeout", new Integer(selectorTimeout));
+ }
+
+ public void setSocket_appReadBufSize(int socket_appReadBufSize) {
+ connector.setAttribute("socket.appReadBufSize", new Integer(socket_appReadBufSize));
+ }
+
+ public void setSocket_appWriteBufSize(int socket_appWriteBufSize) {
+ connector.setAttribute("socket.appWriteBufSize", new Integer(socket_appWriteBufSize));
+ }
+
+ public void setSocket_bufferPool(int socket_bufferPool) {
+ connector.setAttribute("socket.bufferPool", new Integer(socket_bufferPool));
+ }
+
+ public void setSocket_bufferPoolSize(int socket_bufferPoolSize) {
+ connector.setAttribute("socket.bufferPoolSize", new Integer(socket_bufferPoolSize));
+ }
+
+ public void setSocket_directBuffer(boolean socket_directBuffer) {
+ connector.setAttribute("socket.directBuffer", new Boolean(socket_directBuffer));
+ }
+
+ public void setSocket_eventCache(int socket_eventCache) {
+ connector.setAttribute("socket.eventCache", new Integer(socket_eventCache));
+ }
+
+ public void setSocket_keyCache(int socket_keyCache) {
+ connector.setAttribute("socket.keyCache", new Integer(socket_keyCache));
+ }
+
+ public void setSocket_ooBInline(boolean socket_ooBInline) {
+ connector.setAttribute("socket.ooBInline", new Boolean(socket_ooBInline));
+ }
+
+ public void setSocket_performanceBandwidth(int socket_performanceBandwidth) {
+ connector.setAttribute("socket.performanceBandwidth", new Integer(socket_performanceBandwidth));
+ }
+
+ public void setSocket_performanceConnectionTime(int socket_performanceConnectionTime) {
+ connector.setAttribute("socket.performanceConnectionTime", new Integer(socket_performanceConnectionTime));
+ }
+
+ public void setSocket_performanceLatency(int socket_performanceLatency) {
+ connector.setAttribute("socket.performanceLatency", new Integer(socket_performanceLatency));
+ }
+
+ public void setSocket_processorCache(int socket_processorCache) {
+ connector.setAttribute("socket.processorCache", new Integer(socket_processorCache));
+ }
+
+ public void setSocket_rxBufSize(int socket_rxBufSize) {
+ connector.setAttribute("socket.rxBufSize", new Integer(socket_rxBufSize));
+ }
+
+ public void setSocket_soKeepAlive(boolean socket_soKeepAlive) {
+ connector.setAttribute("socket.soKeepAlive", new Boolean(socket_soKeepAlive));
+ }
+
+ public void setSocket_soLingerOn(boolean socket_soLingerOn) {
+ connector.setAttribute("socket.soLingerOn", new Boolean(socket_soLingerOn));
+ }
+
+ public void setSocket_soLingerTime(int socket_soLingerTime) {
+ connector.setAttribute("socket.soLingerTime", new Integer(socket_soLingerTime));
+ }
+
+ public void setSocket_soReuseAddress(boolean socket_soReuseAddress) {
+ connector.setAttribute("socket.soReuseAddress", new Boolean(socket_soReuseAddress));
+ }
+
+ public void setSocket_soTimeout(int socket_soTimeout) {
+ connector.setAttribute("socket.soTimeout", new Integer(socket_soTimeout));
+ }
+
+ public void setSocket_soTrafficClass(byte socket_soTrafficClass) {
+ connector.setAttribute("socket.soTrafficClass", new Byte(socket_soTrafficClass));
+ }
+
+ public void setSocket_tcpNoDelay(boolean socket_tcpNoDelay) {
+ connector.setAttribute("socket.tcpNoDelay", new Boolean(socket_tcpNoDelay));
+ }
+
+ public void setSocket_txBufSize(int socket_txBufSize) {
+ connector.setAttribute("socket.txBufSize", new Integer(socket_txBufSize));
+ }
+
+ public void setUseComet(boolean useComet) {
+ connector.setAttribute("useExecutor", new Boolean(useComet));
+ }
+
+ public void setUseExecutor(boolean useExecutor) {
+ connector.setAttribute("useExecutor", new Boolean(useExecutor));
+ }
+
+ public void setUseSendFile(boolean useSendFile) {
+ connector.setAttribute("useSendFile", new Boolean(useSendFile));
+ }
+ public static final GBeanInfo GBEAN_INFO;
+
+ static {
+ GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic("Tomcat Connector", Http11NIOConnectorGBean.class, BaseHttp11ConnectorGBean.GBEAN_INFO);
+ infoFactory.addInterface(Http11Protocol.class,
+ new String[] {
+ "useSendfile",
+ "useExecutor",
+ "acceptorThreadCount",
+ "pollerThreadCount",
+ "pollerThreadPriority",
+ "acceptorThreadPriority",
+ "selectorTimeout",
+ "useComet",
+ "processCache",
+ "socket_directBuffer",
+ "socket_rxBufSize",
+ "socket_txBufSize",
+ "socket_appReadBufSize",
+ "socket_appWriteBufSize",
+ "socket_processorCache",
+ "socket_bufferPoolSize",
+ "socket_keyCache",
+ "socket_eventCache",
+ "socket_tcpNoDelay",
+ "socket_soKeepAlive",
+ "socket_ooBInline",
+ "socket_soReuseAddress",
+ "socket_soLingerOn",
+ "socket_soLingerTime",
+ "socket_soTimeout",
+ "socket_soTrafficClass",
+ "socket_performanceConnectionTime",
+ "socket_performanceLatency",
+ "socket_performanceBandwidth",
+ "selectorPool_maxSelectors",
+ "selectorPool_maxSpareSelectors",
+ "command_line_options",
+ "oomParachute"
+ },
+ new String[] {
+ "useSendfile",
+ "useExecutor",
+ "acceptorThreadCount",
+ "pollerThreadCount",
+ "pollerThreadPriority",
+ "acceptorThreadPriority",
+ "selectorTimeout",
+ "useComet",
+ "processCache",
+ "socket_directBuffer",
+ "socket_rxBufSize",
+ "socket_txBufSize",
+ "socket_appReadBufSize",
+ "socket_appWriteBufSize",
+ "socket_processorCache",
+ "socket_bufferPoolSize",
+ "socket_keyCache",
+ "socket_eventCache",
+ "socket_tcpNoDelay",
+ "socket_soKeepAlive",
+ "socket_ooBInline",
+ "socket_soReuseAddress",
+ "socket_soLingerOn",
+ "socket_soLingerTime",
+ "socket_soTimeout",
+ "socket_soTrafficClass",
+ "socket_performanceConnectionTime",
+ "socket_performanceLatency",
+ "socket_performanceBandwidth",
+ "selectorPool_maxSelectors",
+ "selectorPool_maxSpareSelectors",
+ "command_line_options",
+ "oomParachute",
+
+ }
+ );
+ infoFactory.setConstructor(new String[] { "name", "address", "port", "TomcatContainer", "ServerInfo"});
+ GBEAN_INFO = infoFactory.getBeanInfo();
+ }
+
+ public static GBeanInfo getGBeanInfo() {
+ return GBEAN_INFO;
+ }
+
+}
Added: geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11NIOProtocol.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11NIOProtocol.java?view=auto&rev=559530
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11NIOProtocol.java (added)
+++ geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11NIOProtocol.java Wed Jul 25 10:36:48 2007
@@ -0,0 +1,92 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. 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. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.geronimo.tomcat.connector;
+
+public interface Http11NIOProtocol {
+
+ public boolean getUseSendFile();
+ public void setUseSendFile(boolean useSendFile);
+ public boolean getUseExecutor();
+ public void setUseExecutor(boolean useExecutor);
+ public int getAcceptorThreadCount();
+ public void setAcceptorThreadCount(int acceptorThreadCount);
+ public int getAcceptorThreadPriority();
+ public void setAcceptorThreadPriority(int acceptorThreadPriority);
+ public int getPollerThreadCount();
+ public void setPollerThreadCount(int pollerThreadCount);
+ public int getPollerThreadPriority();
+ public void setPollerThreadPriority(int pollerThreadPriority);
+ public int getSelectorTimeout();
+ public void setSelectorTimeout(int selectorTimeout);
+ public boolean getUseComet();
+ public void setUseComet(boolean useComet);
+ public int getProcessCache();
+ public void setProcessCache(int processCache);
+ public boolean getSocket_directBuffer();
+ public void setSocket_directBuffer(boolean socket_directBuffer);
+ public int getSocket_rxBufSize();
+ public void setSocket_rxBufSize(int socket_rxBufSize);
+ public int getSocket_txBufSize();
+ public void setSocket_txBufSize(int socket_txBufSize);
+ public int getSocket_appReadBufSize();
+ public void setSocket_appReadBufSize(int socket_appReadBufSize);
+ public int getSocket_appWriteBufSize();
+ public void setSocket_appWriteBufSize(int socket_appWriteBufSize);
+ public int getSocket_bufferPool();
+ public void setSocket_bufferPool(int socket_bufferPool);
+ public int getSocket_bufferPoolSize();
+ public void setSocket_bufferPoolSize(int socket_bufferPoolSize);
+ public int getSocket_processorCache();
+ public void setSocket_processorCache(int socket_processorCache);
+ public int getSocket_keyCache();
+ public void setSocket_keyCache(int socket_keyCache);
+ public int getSocket_eventCache();
+ public void setSocket_eventCache(int socket_eventCache);
+ public boolean getSocket_tcpNoDelay();
+ public void setSocket_tcpNoDelay(boolean socket_tcpNoDelay);
+ public boolean getSocket_soKeepAlive();
+ public void setSocket_soKeepAlive(boolean socket_soKeepAlive);
+ public boolean getSocket_ooBInline();
+ public void setSocket_ooBInline(boolean socket_ooBInline);
+ public boolean getSocket_soReuseAddress();
+ public void setSocket_soReuseAddress(boolean socket_soReuseAddress);
+ public boolean getSocket_soLingerOn();
+ public void setSocket_soLingerOn(boolean socket_soLingerOn);
+ public int getSocket_soLingerTime();
+ public void setSocket_soLingerTime(int socket_soLingerTime);
+ public int getSocket_soTimeout();
+ public void setSocket_soTimeout(int socket_soTimeout);
+ public byte getSocket_soTrafficClass();
+ public void setSocket_soTrafficClass(byte socket_soTrafficClass);
+ public int getSocket_performanceConnectionTime();
+ public void setSocket_performanceConnectionTime(int socket_performanceConnectionTime);
+ public int getSocket_performanceLatency();
+ public void setSocket_performanceLatency(int socket_performanceLatency);
+ public int getSocket_performanceBandwidth();
+ public void setSocket_performanceBandwidth(int socket_performanceBandwidth);
+ public int getSelectorPool_maxSelectors();
+ public void setSelectorPool_maxSelectors(int selectorPool_maxSelectors);
+ public int getSelectorPool_maxSpareSelectors();
+ public void setSelectorPool_maxSpareSelectors(int selectorPool_maxSpareSelectors);
+ public boolean getCommand_line_options();
+ public void setCommand_line_options(boolean command_line_options);
+ public int getOomParachute();
+ public void setOomParachute(int oomParachute);
+
+}
Added: geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11Protocol.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11Protocol.java?view=auto&rev=559530
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11Protocol.java (added)
+++ geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11Protocol.java Wed Jul 25 10:36:48 2007
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. 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. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.geronimo.tomcat.connector;
+
+public interface Http11Protocol extends BaseHttp11Protocol {
+
+ //Https
+ public String getAlgorithm();
+ public void setAlgorithm(String algorithm);
+ public boolean getClientAuth();
+ public void setClientAuth(String clientAuth);
+ public String getKeystoreFile();
+ public void setKeystoreFile(String keystoreFile);
+ public void setKeystorePass(String keystorePass);
+ public String getKeystoreType();
+ public void setKeystoreType(String keystoreType);
+ public String getSslProtocol();
+ public void setSslProtocol(String sslProtocol);
+ public String getCiphers();
+ public void setCiphers(String ciphers);
+ public String getKeyAlias();
+ public void setKeyAlias(String keyAlias);
+ public String getTruststoreFile();
+ public void setTruststoreFile(String truststoreFile);
+ public void setTruststorePass(String truststorePass);
+ public String getTruststoreType();
+ public void setTruststoreType(String truststoreType);
+
+}
Added: geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Https11ConnectorGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Https11ConnectorGBean.java?view=auto&rev=559530
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Https11ConnectorGBean.java (added)
+++ geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Https11ConnectorGBean.java Wed Jul 25 10:36:48 2007
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. 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. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.geronimo.tomcat.connector;
+
+import org.apache.geronimo.gbean.GBeanInfo;
+import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.system.serverinfo.ServerInfo;
+import org.apache.geronimo.tomcat.TomcatContainer;
+
+public class Https11ConnectorGBean extends Http11ConnectorGBean {
+
+ public Https11ConnectorGBean(String name, String address, int port, TomcatContainer container, ServerInfo serverInfo) throws Exception {
+ super(name, address, port, container, serverInfo);
+ setSslEnabled(true);
+ setScheme("https");
+ setSecure(true);
+ }
+
+ public static final GBeanInfo GBEAN_INFO;
+
+ static {
+ GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic("Tomcat Connector", Https11ConnectorGBean.class, Http11ConnectorGBean.GBEAN_INFO);
+ infoFactory.setConstructor(new String[] { "name", "address", "port", "TomcatContainer", "ServerInfo"});
+ GBEAN_INFO = infoFactory.getBeanInfo();
+ }
+
+ public static GBeanInfo getGBeanInfo() {
+ return GBEAN_INFO;
+ }
+}
Added: geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Https11NIOConnectorGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Https11NIOConnectorGBean.java?view=auto&rev=559530
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Https11NIOConnectorGBean.java (added)
+++ geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Https11NIOConnectorGBean.java Wed Jul 25 10:36:48 2007
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. 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. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.geronimo.tomcat.connector;
+
+import org.apache.geronimo.gbean.GBeanInfo;
+import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.system.serverinfo.ServerInfo;
+import org.apache.geronimo.tomcat.TomcatContainer;
+
+public class Https11NIOConnectorGBean extends Http11NIOConnectorGBean {
+
+ public Https11NIOConnectorGBean(String name, String address, int port, TomcatContainer container, ServerInfo serverInfo) throws Exception {
+ super(name, address, port, container, serverInfo);
+ setSslEnabled(true);
+ setScheme("https");
+ setSecure(true);
+ }
+
+ public static final GBeanInfo GBEAN_INFO;
+
+ static {
+ GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic("Tomcat Connector", Https11NIOConnectorGBean.class, Http11NIOConnectorGBean.GBEAN_INFO);
+ infoFactory.setConstructor(new String[] { "name", "address", "port", "TomcatContainer", "ServerInfo"});
+ GBEAN_INFO = infoFactory.getBeanInfo();
+ }
+
+ public static GBeanInfo getGBeanInfo() {
+ return GBEAN_INFO;
+ }
+}