## org.apache.catalina.connector.http
Class HttpConnector

    java.lang.Object
      org.apache.catalina.connector.http.HttpConnector

All Implemented Interfaces:
  Connector, Lifecycle, java.lang.Runnable

public final class HttpConnector
extends java.lang.Object
implements Connector, Lifecycle, java.lang.Runnable

Implementation of an HTTP/1.1 connector.

Version:
  $Revision: 1.35 $ $Date: 2004/08/26 21:28:57 $
Author:
  Craig R. McClanahan, Remy Maucherat

Field Summary
`protected Container` `container` Deprecated. The Container used for processing requests received by this Connector.
`protected LifecycleSupport` `lifecycle` Deprecated. The lifecycle event support for this component.
`protected int` `minProcessors` Deprecated. The minimum number of processors to start at initialization time.

Fields inherited from interface org.apache.catalina.Lifecycle
`AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, START_EVENT, STOP_EVENT`

Constructor Summary
`HttpConnector()` Deprecated.

Method Summary
`void` `addLifecycleListener(LifecycleListener listener)` Deprecated. Add a lifecycle event listener to this component.
`Request` `createRequest()` Deprecated. Create (or allocate) and return a Request object suitable for specifying the contents of a Request to the responsible Container.
`Response` `createResponse()` Deprecated. Create (or allocate) and return a Response object suitable for receiving the contents of a Response from the responsible Container.
`LifecycleListener[]` `findLifecycleListeners()` Deprecated. Get the lifecycle listeners associated with this lifecycle.
`int` `getAcceptCount()` Deprecated. Return the accept count for this Connector.
`java.lang.String` `getAddress()` Deprecated. Return the bind IP address for this Connector.
`boolean` `getAllowChunking()` Deprecated. Get the allow chunking flag.
`int` `getBufferSize()` Deprecated. Return the input buffer size for this Connector.
`int` `getConnectionTimeout()` Deprecated. Return the connection timeout for this Connector.
`Container` `getContainer()` Deprecated. Return the Container used for processing requests received by this Connector.
`int` `getCurProcessors()` Deprecated. Return the current number of processors that have been created.
`int` `getDebug()` Deprecated. Return the debugging detail level for this component.
`boolean` `getEnableLookups()` Deprecated. Return the "enable DNS lookups" flag.
`ServerSocketFactory` `getFactory()` Deprecated. Return the server socket factory used by this Container.
`java.lang.String` `getInfo()` Deprecated. Return descriptive information about this Connector implementation.
`int` `getMaxProcessors()` Deprecated. Return the maximum number of processors allowed, or <0 for unlimited.
`int` `getMinProcessors()` Deprecated. Return the minimum number of processors to start at initialization.
`int` `getPort()` Deprecated. Return the port number on which we listen for HTTP requests.
`java.lang.String` `getProxyName()` Deprecated. Return the proxy server name for this Connector.
`int` `getProxyPort()` Deprecated. Return the proxy server port for this Connector.
`int` `getRedirectPort()` Deprecated. Return the port number to which a request should be redirected if it comes in on a non-SSL port and is subject to a security constraint with a transport guarantee that requires SSL.
`java.lang.String` `getScheme()` Deprecated. Return the scheme that will be assigned to requests received through this connector.
`boolean` `getSecure()` Deprecated. Return the secure connection flag that will be assigned to requests received through this connector.
`Service` `getService()` Deprecated. Return the `Service` with which we are associated (if any).
`boolean` `getTcpNoDelay()` Deprecated. Return the TCP no delay flag value.
`void` `initialize()` Deprecated. Initialize this connector (create ServerSocket here!)
`boolean` `isAvailable()` Deprecated. Is this connector available for processing requests?
`boolean` `isChunkingAllowed()` Deprecated. Get the allow chunking flag.
`void` `removeLifecycleListener(LifecycleListener listener)` Deprecated. Remove a lifecycle event listener from this component.
`void` `run()` Deprecated. The background thread that listens for incoming TCP/IP connections and hands them off to an appropriate processor.
`void` `setAcceptCount(int count)` Deprecated. Set the accept count for this Connector.
`void` `setAddress(java.lang.String address)` Deprecated. Set the bind IP address for this Connector.
`void` `setAllowChunking(boolean allowChunking)` Deprecated. Set the allow chunking flag.
`void` `setBufferSize(int bufferSize)` Deprecated. Set the input buffer size for this Connector.
`void` `setConnectionTimeout(int connectionTimeout)` Deprecated. Set the connection timeout for this Connector.
`void` `setContainer(Container container)` Deprecated. Set the Container used for processing requests received by this Connector.
`void` `setDebug(int debug)` Deprecated. Set the debugging detail level for this component.
`void` `setEnableLookups(boolean enableLookups)` Deprecated. Set the "enable DNS lookups" flag.
`void` `setFactory(ServerSocketFactory factory)` Deprecated. Set the server socket factory used by this Container.
`void` `setMaxProcessors(int maxProcessors)` Deprecated. Set the maximum number of processors allowed, or <0 for unlimited.
`void` `setMinProcessors(int minProcessors)` Deprecated. Set the minimum number of processors to start at initialization.
`void` `setPort(int port)` Deprecated. Set the port number on which we listen for HTTP requests.
`void` `setProxyName(java.lang.String proxyName)` Deprecated. Set the proxy server name for this Connector.
`void` `setProxyPort(int proxyPort)` Deprecated. Set the proxy server port for this Connector.
`void` `setRedirectPort(int redirectPort)` Deprecated. Set the redirect port number.
`void` `setScheme(java.lang.String scheme)` Deprecated. Set the scheme that will be assigned to requests received through this connector.
`void` `setSecure(boolean secure)` Deprecated. Set the secure connection flag that will be assigned to requests received through this connector.
`void` `setService(Service service)` Deprecated. Set the `Service` with which we are associated (if any).
`void` `setTcpNoDelay(boolean tcpNoDelay)` Deprecated. Set the TCP no delay flag which will be set on the socket after accepting a connection.
`void` `start()` Deprecated. Begin processing requests via this Connector.
`void` `stop()` Deprecated. Terminate processing requests via this Connector.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### container

    protected Container container

  Deprecated.
  The Container used for processing requests received by this Connector.

### lifecycle

    protected LifecycleSupport lifecycle

  Deprecated.
  The lifecycle event support for this component.

### minProcessors

    protected int minProcessors

  Deprecated.
  The minimum number of processors to start at initialization time.

Constructor Detail

### HttpConnector

    public HttpConnector()

  Deprecated.

Method Detail

### getService

    public Service getService()

  Deprecated.
  Return the `Service` with which we are associated (if any).

  Specified by:
    `getService` in interface `Connector`

### setService

    public void setService(Service service)

  Deprecated.
  Set the `Service` with which we are associated (if any).

  Specified by:
    `setService` in interface `Connector`
  Parameters:
    `service` - The service that owns this Engine

### getConnectionTimeout

    public int getConnectionTimeout()

  Deprecated.
  Return the connection timeout for this Connector.

### setConnectionTimeout

    public void setConnectionTimeout(int connectionTimeout)

  Deprecated.
  Set the connection timeout for this Connector.

### getAcceptCount

    public int getAcceptCount()

  Deprecated.
  Return the accept count for this Connector.

### setAcceptCount

    public void setAcceptCount(int count)

  Deprecated.
  Set the accept count for this Connector.

  Parameters:
    `count` - The new accept count

### isChunkingAllowed

    public boolean isChunkingAllowed()

  Deprecated.
  Get the allow chunking flag.

### getAllowChunking

    public boolean getAllowChunking()

  Deprecated.
  Get the allow chunking flag.

### setAllowChunking

    public void setAllowChunking(boolean allowChunking)

  Deprecated.
  Set the allow chunking flag.

  Parameters:
    `allowChunking` - Allow chunking flag

### getAddress

    public java.lang.String getAddress()

  Deprecated.
  Return the bind IP address for this Connector.

### setAddress

    public void setAddress(java.lang.String address)

  Deprecated.
  Set the bind IP address for this Connector.

  Parameters:
    `address` - The bind IP address

### isAvailable

    public boolean isAvailable()

  Deprecated.
  Is this connector available for processing requests?

### getBufferSize

    public int getBufferSize()

  Deprecated.
  Return the input buffer size for this Connector.

### setBufferSize

    public void setBufferSize(int bufferSize)

  Deprecated.
  Set the input buffer size for this Connector.

  Parameters:
    `bufferSize` - The new input buffer size.

### getContainer

    public Container getContainer()

  Deprecated.
  Return the Container used for processing requests received by this Connector.

  Specified by:
    `getContainer` in interface `Connector`

### setContainer

    public void setContainer(Container container)

  Deprecated.
  Set the Container used for processing requests received by this Connector.

  Specified by:
    `setContainer` in interface `Connector`
  Parameters:
    `container` - The new Container to use

### getCurProcessors

    public int getCurProcessors()

  Deprecated.
  Return the current number of processors that have been created.

### getDebug

    public int getDebug()

  Deprecated.
  Return the debugging detail level for this component.

### setDebug

    public void setDebug(int debug)

  Deprecated.
  Set the debugging detail level for this component.

  Parameters:
    `debug` - The new debugging detail level

### getEnableLookups

    public boolean getEnableLookups()

  Deprecated.
  Return the "enable DNS lookups" flag.

  Specified by:
    `getEnableLookups` in interface `Connector`

### setEnableLookups

    public void setEnableLookups(boolean enableLookups)

  Deprecated.
  Set the "enable DNS lookups" flag.

  Specified by:
    `setEnableLookups` in interface `Connector`
  Parameters:
    `enableLookups` - The new "enable DNS lookups" flag value

### getFactory

    public ServerSocketFactory getFactory()

  Deprecated.
  Return the server socket factory used by this Container.

  Specified by:
    `getFactory` in interface `Connector`

### setFactory

    public void setFactory(ServerSocketFactory factory)

  Deprecated.
  Set the server socket factory used by this Container.

  Specified by:
    `setFactory` in interface `Connector`
  Parameters:
    `factory` - The new server socket factory

### getInfo

    public java.lang.String getInfo()

  Deprecated.
  Return descriptive information about this Connector implementation.

  Specified by:
    `getInfo` in interface `Connector`

### getMinProcessors

    public int getMinProcessors()

  Deprecated.
  Return the minimum number of processors to start at initialization.

### setMinProcessors

    public void setMinProcessors(int minProcessors)

  Deprecated.
  Set the minimum number of processors to start at initialization.

  Parameters:
    `minProcessors` - The new minimum processors

### getMaxProcessors

    public int getMaxProcessors()

  Deprecated.
  Return the maximum number of processors allowed, or <0 for unlimited.

### setMaxProcessors

    public void setMaxProcessors(int maxProcessors)

  Deprecated.
  Set the maximum number of processors allowed, or <0 for unlimited.

  Parameters:
    `maxProcessors` - The new maximum processors

### getPort

    public int getPort()

  Deprecated.
  Return the port number on which we listen for HTTP requests.

### setPort

    public void setPort(int port)

  Deprecated.
  Set the port number on which we listen for HTTP requests.

  Parameters:
    `port` - The new port number

### getProxyName

    public java.lang.String getProxyName()

  Deprecated.
  Return the proxy server name for this Connector.

### setProxyName

    public void setProxyName(java.lang.String proxyName)

  Deprecated.
  Set the proxy server name for this Connector.

  Parameters:
    `proxyName` - The new proxy server name

### getProxyPort

    public int getProxyPort()

  Deprecated.
  Return the proxy server port for this Connector.

### setProxyPort

    public void setProxyPort(int proxyPort)

  Deprecated.
  Set the proxy server port for this Connector.

  Parameters:
    `proxyPort` - The new proxy server port

### getRedirectPort

    public int getRedirectPort()

  Deprecated.
  Return the port number to which a request should be redirected if it comes in on a non-SSL port and is subject to a security constraint with a transport guarantee that requires SSL.

  Specified by:
    `getRedirectPort` in interface `Connector`

### setRedirectPort

    public void setRedirectPort(int redirectPort)

  Deprecated.
  Set the redirect port number.

  Specified by:
    `setRedirectPort` in interface `Connector`
  Parameters:
    `redirectPort` - The redirect port number (non-SSL to SSL)

### getScheme

    public java.lang.String getScheme()

  Deprecated.
  Return the scheme that will be assigned to requests received through this connector. Default value is "http".

  Specified by:
    `getScheme` in interface `Connector`

### setScheme

    public void setScheme(java.lang.String scheme)

  Deprecated.
  Set the scheme that will be assigned to requests received through this connector.

  Specified by:
    `setScheme` in interface `Connector`
  Parameters:
    `scheme` - The new scheme

### getSecure

    public boolean getSecure()

  Deprecated.
  Return the secure connection flag that will be assigned to requests received through this connector. Default value is "false".

  Specified by:
    `getSecure` in interface `Connector`

### setSecure

    public void setSecure(boolean secure)

  Deprecated.
  Set the secure connection flag that will be assigned to requests received through this connector.

  Specified by:
    `setSecure` in interface `Connector`
  Parameters:
    `secure` - The new secure connection flag

### getTcpNoDelay

    public boolean getTcpNoDelay()

  Deprecated.
  Return the TCP no delay flag value.

### setTcpNoDelay

    public void setTcpNoDelay(boolean tcpNoDelay)

  Deprecated.
  Set the TCP no delay flag which will be set on the socket after accepting a connection.

  Parameters:
    `tcpNoDelay` - The new TCP no delay flag

### createRequest

    public Request createRequest()

  Deprecated.
  Create (or allocate) and return a Request object suitable for specifying the contents of a Request to the responsible Container.

  Specified by:
    `createRequest` in interface `Connector`

### createResponse

    public Response createResponse()

  Deprecated.
  Create (or allocate) and return a Response object suitable for receiving the contents of a Response from the responsible Container.

  Specified by:
    `createResponse` in interface `Connector`

### run

    public void run()

  Deprecated.
  The background thread that listens for incoming TCP/IP connections and hands them off to an appropriate processor.

  Specified by:
    `run` in interface `java.lang.Runnable`

### addLifecycleListener

    public void addLifecycleListener(LifecycleListener listener)

  Deprecated.
  Add a lifecycle event listener to this component.

  Specified by:
    `addLifecycleListener` in interface `Lifecycle`
  Parameters:
    `listener` - The listener to add

### findLifecycleListeners

    public LifecycleListener[] findLifecycleListeners()

  Deprecated.
  Get the lifecycle listeners associated with this lifecycle. If this Lifecycle has no listeners registered, a zero-length array is returned.

  Specified by:
    `findLifecycleListeners` in interface `Lifecycle`

### removeLifecycleListener

    public void removeLifecycleListener(LifecycleListener listener)

  Deprecated.
  Remove a lifecycle event listener from this component.

  Specified by:
    `removeLifecycleListener` in interface `Lifecycle`
  Parameters:
    `listener` - The listener to add

### initialize

    public void initialize()
                    throws LifecycleException

  Deprecated.
  Initialize this connector (create ServerSocket here!)

  Specified by:
    `initialize` in interface `Connector`
  Throws:
    `LifecycleException` - If this server was already initialized.

### start

    public void start()
               throws LifecycleException

  Deprecated.
  Begin processing requests via this Connector.

  Specified by:
    `start` in interface `Lifecycle`
  Throws:
    `LifecycleException` - if a fatal startup error occurs

### stop

    public void stop()
              throws LifecycleException

  Deprecated.
  Terminate processing requests via this Connector.

  Specified by:
    `stop` in interface `Lifecycle`
  Throws:
    `LifecycleException` - if a fatal shutdown error occurs

Copyright ? 2000-2002 Apache Software Foundation. All Rights Reserved.