View Javadoc

1   /**
2    *
3    * Copyright 2003-2004 The Apache Software Foundation
4    *
5    *  Licensed under the Apache License, Version 2.0 (the "License");
6    *  you may not use this file except in compliance with the License.
7    *  You may obtain a copy of the License at
8    *
9    *     http://www.apache.org/licenses/LICENSE-2.0
10   *
11   *  Unless required by applicable law or agreed to in writing, software
12   *  distributed under the License is distributed on an "AS IS" BASIS,
13   *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   *  See the License for the specific language governing permissions and
15   *  limitations under the License.
16   */
17  package org.apache.geronimo.management.geronimo;
18  
19  /**
20   * The common configuration settings for a web container network connector --
21   * that is, the protocol and network settings used to connect to the web
22   * container (with a variety of tuning arguments as well).
23   *
24   * http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/http.html
25   * http://mortbay.org/javadoc/org/mortbay/http/SocketListener.html
26   *
27   * @version $Rev: 355877 $ $Date: 2005-12-10 18:48:27 -0800 (Sat, 10 Dec 2005) $
28   */
29  public interface WebConnector extends NetworkConnector {
30      /**
31       * Gets the size of the buffer used to handle network data for this
32       * connector.
33       */
34      public int getBufferSizeBytes();
35      /**
36       * Gets the size of the buffer used to handle network data for this
37       * connector.
38       */
39      public void setBufferSizeBytes(int bytes);
40      /**
41       * Gets the maximum number of threads used to service connections from
42       * this connector.
43       */
44      public int getMaxThreads();
45      /**
46       * Sets the maximum number of threads used to service connections from
47       * this connector.
48       */
49      public void setMaxThreads(int threads);
50      /**
51       * Gets the maximum number of connections that may be queued while all
52       * threads are busy.  Any requests received while the queue is full will
53       * be rejected.
54       */
55      public int getAcceptQueueSize();
56      /**
57       * Sets the maximum number of connections that may be queued while all
58       * threads are busy.  Any requests received while the queue is full will
59       * be rejected.
60       */
61      public void setAcceptQueueSize(int size);
62      /**
63       * Gets the amount of time the socket used by this connector will linger
64       * after being closed.  -1 indicates that socket linger is disabled.
65       */
66      public int getLingerMillis();
67      /**
68       * Sets the amount of time the socket used by this connector will linger
69       * after being closed.  Use -1 to disable socket linger.
70       */
71      public void setLingerMillis(int millis);
72      /**
73       * Gets whether the TCP_NODELAY flag is set for the sockets used by this
74       * connector.  This usually enhances performance, so it should typically
75       * be set.
76       */
77      public boolean isTcpNoDelay();
78      /**
79       * Sets whether the TCP_NODELAY flag is set for the sockets used by this
80       * connector.  This usually enhances performance, so it should typically
81       * be set.
82       */
83      public void setTcpNoDelay(boolean enable);
84      /**
85       * Gets the network port to which traffic will be redirected if this
86       * connector handles insecure traffic and the request requires a secure
87       * connection.  Needless to say, this should point to another connector
88       * configured for SSL.
89       */
90      public int getRedirectPort();
91      /**
92       * Gets the network port to which traffic will be redirected if this
93       * connector handles insecure traffic and the request requires a secure
94       * connection.  Needless to say, this should point to another connector
95       * configured for SSL.  If no SSL connector is available, any port can
96       * be used as they all fail equally well.  :)
97       */
98      public void setRedirectPort(int port);
99  
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 }