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: 706640 $ $Date: 2008-10-21 14:44:05 +0000 (Tue, 21 Oct 2008) $
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 size of the header buffer used to handle network data for this
042         * connector.
043         */
044        public int getHeaderBufferSizeBytes();
045        /**
046         * Sets the size of the Header buffer used to handle network data for this
047         * connector.
048         */
049        public void setHeaderBufferSizeBytes(int bytes);
050        /**
051         * Gets the maximum number of threads used to service connections from
052         * this connector.
053         */
054        public int getMaxThreads();
055        /**
056         * Sets the maximum number of threads used to service connections from
057         * this connector.
058         */
059        public void setMaxThreads(int threads);
060        /**
061         * Gets the maximum number of connections that may be queued while all
062         * threads are busy.  Any requests received while the queue is full will
063         * be rejected.
064         */
065        public int getAcceptQueueSize();
066        /**
067         * Sets the maximum number of connections that may be queued while all
068         * threads are busy.  Any requests received while the queue is full will
069         * be rejected.
070         */
071        public void setAcceptQueueSize(int size);
072        /**
073         * Gets the amount of time the socket used by this connector will linger
074         * after being closed.  -1 indicates that socket linger is disabled.
075         */
076        public int getLingerMillis();
077        /**
078         * Sets the amount of time the socket used by this connector will linger
079         * after being closed.  Use -1 to disable socket linger.
080         */
081        public void setLingerMillis(int millis);
082        /**
083         * Gets whether the TCP_NODELAY flag is set for the sockets used by this
084         * connector.  This usually enhances performance, so it should typically
085         * be set.
086         */
087        public boolean isTcpNoDelay();
088        /**
089         * Sets whether the TCP_NODELAY flag is set for the sockets used by this
090         * connector.  This usually enhances performance, so it should typically
091         * be set.
092         */
093        public void setTcpNoDelay(boolean enable);
094        /**
095         * Gets the network port to which traffic will be redirected if this
096         * connector handles insecure traffic and the request requires a secure
097         * connection.  Needless to say, this should point to another connector
098         * configured for SSL.
099         */
100        public int getRedirectPort();
101        /**
102         * Gets the network port to which traffic will be redirected if this
103         * connector handles insecure traffic and the request requires a secure
104         * connection.  Needless to say, this should point to another connector
105         * configured for SSL.  If no SSL connector is available, any port can
106         * be used as they all fail equally well.  :)
107         */
108        public void setRedirectPort(int port);
109    
110        /**
111         * Gets a URL used to connect to the web server via this connector.
112         * This is not guaranteed to work (for example, if the server is
113         * located behind a proxy), but it should give a reasonable value if
114         * possible.  The form of the returned String should be
115         * http://hostname or http://hostname:port (in other words, suitable
116         * for appending a context path).
117         */
118        public String getConnectUrl();
119    }