001 /**
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements. See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License. You may obtain a copy of the License at
008 *
009 * http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017 package org.apache.geronimo.management.geronimo;
018
019 /**
020 * The common configuration settings for a web container network connector --
021 * that is, the protocol and network settings used to connect to the web
022 * container (with a variety of tuning arguments as well).
023 *
024 * http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/http.html
025 * http://mortbay.org/javadoc/org/mortbay/http/SocketListener.html
026 *
027 * @version $Rev: 476049 $ $Date: 2006-11-16 23:35:17 -0500 (Thu, 16 Nov 2006) $
028 */
029 public interface WebConnector extends NetworkConnector {
030 /**
031 * Gets the size of the buffer used to handle network data for this
032 * connector.
033 */
034 public int getBufferSizeBytes();
035 /**
036 * Gets the size of the buffer used to handle network data for this
037 * connector.
038 */
039 public void setBufferSizeBytes(int bytes);
040 /**
041 * Gets the maximum number of threads used to service connections from
042 * this connector.
043 */
044 public int getMaxThreads();
045 /**
046 * Sets the maximum number of threads used to service connections from
047 * this connector.
048 */
049 public void setMaxThreads(int threads);
050 /**
051 * Gets the maximum number of connections that may be queued while all
052 * threads are busy. Any requests received while the queue is full will
053 * be rejected.
054 */
055 public int getAcceptQueueSize();
056 /**
057 * Sets the maximum number of connections that may be queued while all
058 * threads are busy. Any requests received while the queue is full will
059 * be rejected.
060 */
061 public void setAcceptQueueSize(int size);
062 /**
063 * Gets the amount of time the socket used by this connector will linger
064 * after being closed. -1 indicates that socket linger is disabled.
065 */
066 public int getLingerMillis();
067 /**
068 * Sets the amount of time the socket used by this connector will linger
069 * after being closed. Use -1 to disable socket linger.
070 */
071 public void setLingerMillis(int millis);
072 /**
073 * Gets whether the TCP_NODELAY flag is set for the sockets used by this
074 * connector. This usually enhances performance, so it should typically
075 * be set.
076 */
077 public boolean isTcpNoDelay();
078 /**
079 * Sets whether the TCP_NODELAY flag is set for the sockets used by this
080 * connector. This usually enhances performance, so it should typically
081 * be set.
082 */
083 public void setTcpNoDelay(boolean enable);
084 /**
085 * Gets the network port to which traffic will be redirected if this
086 * connector handles insecure traffic and the request requires a secure
087 * connection. Needless to say, this should point to another connector
088 * configured for SSL.
089 */
090 public int getRedirectPort();
091 /**
092 * Gets the network port to which traffic will be redirected if this
093 * connector handles insecure traffic and the request requires a secure
094 * connection. Needless to say, this should point to another connector
095 * configured for SSL. If no SSL connector is available, any port can
096 * be used as they all fail equally well. :)
097 */
098 public void setRedirectPort(int port);
099
100 /**
101 * Gets a URL used to connect to the web server via this connector.
102 * This is not guaranteed to work (for example, if the server is
103 * located behind a proxy), but it should give a reasonable value if
104 * possible. The form of the returned String should be
105 * http://hostname or http://hostname:port (in other words, suitable
106 * for appending a context path).
107 */
108 public String getConnectUrl();
109 }