Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.catalina.connector.warp
Class WarpConnector

    java.lang.Object
      |
      +--org.apache.catalina.connector.warp.WarpConnector

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

Field Summary
`protected int` | `uniqueId` The unique ID of this connector instance.

Fields inherited from interface org.apache.catalina.Lifecycle
`START_EVENT, STOP_EVENT`

Constructor Summary
`WarpConnector()` Construct a new instance of a `WarpConnector`.

Method Summary
`void` | `addLifecycleListener(LifecycleListener listener)` Add a `LifecycleEvent` listener to this `Connector`.
`protected Context` | `applicationContext(int id)` Return the application for a given ID.
`protected int` | `applicationId(Context context)` Return the application ID for a given `Context`.
`Request` | `createRequest()` Create (or allocate) and return a Request object suitable for specifying the contents of a Request to the responsible Container.
`Response` | `createResponse()` Create (or allocate) and return a Response object suitable for receiving the contents of a Response from the responsible Container.
`LifecycleListener[]` | `findLifecycleListeners()` Get the lifecycle listeners associated with this lifecycle.
`int` | `getAcceptCount()` Return the accept count for this Connector.
`java.lang.String` | `getAddress()` Return the IP address to which this `Connector` will bind to.
`java.lang.String` | `getAppBase()` Get the applications base directory for hosts created via WARP.
`Container` | `getContainer()` Return the `Container` instance which will process all requests received by this `Connector`.
`int` | `getDebug()` Return the debug level.
`boolean` | `getEnableLookups()` Return the "enable DNS lookups" flag.
`ServerSocketFactory` | `getFactory()` Return the `ServerSocketFactory` used by this `Connector` to generate `ServerSocket` instances.
`java.lang.String` | `getInfo()` Return descriptive information about this `Connector`.
`int` | `getPort()` Return the port to which this `Connector` will bind to.
`int` | `getRedirectPort()` 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()` Return the scheme that will be assigned to requests received through this connector.
`boolean` | `getSecure()` Return the secure connection flag that will be assigned to requests received through this connector.
`Service` | `getService()` Return the `Service` with which we are associated (if any).
`void` | `initialize()` Initialize this connector (create ServerSocket here!)
`boolean` | `isStarted()` Check whether this service was started or not.
`void` | `removeLifecycleListener(LifecycleListener listener)` Remove a `LifecycleEvent` listener from this `Connector`.
`void` | `run()` Start accepting WARP requests from the network.
`void` | `setAcceptCount(int count)` Set the accept count for this Connector.
`void` | `setAddress(int port)` Set the IP address to which this `Connector` will bind to.
`void` | `setAddress(java.lang.String address)` Set the IP address to which this `Connector` will bind to.
`void` | `setAppBase(java.lang.String appBase)` Set the applications base directory for hosts created via WARP.
`void` | `setContainer(Container container)` Set the `Container` instance which will process all requests received by this `Connector`.
`void` | `setDebug(int debug)` Set the debug level.
`void` | `setEnableLookups(boolean enableLookups)` Set the "enable DNS lookups" flag.
`void` | `setFactory(ServerSocketFactory factory)` Set the `ServerSocketFactory` used by this `Connector` to generate `ServerSocket` instances.
`void` | `setInfo(java.lang.String info)` Set descriptive information about this `Connector`.
`void` | `setPort(int port)` Set the port to which this `Connector` will bind to.
`void` | `setRedirectPort(int redirectPort)` Set the redirect port number.
`void` | `setScheme(java.lang.String scheme)` Set the scheme that will be assigned to requests received through this connector.
`void` | `setSecure(boolean secure)` Set the secure connection flag that will be assigned to requests received through this connector.
`void` | `setService(Service service)` Set the `Service` with which we are associated (if any).
`void` | `start()` Start accepting connections by this `Connector`.
`void` | `stop()` Stop accepting connections by this `Connector`.

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

Field Detail

### uniqueId

    protected int uniqueId

  The unique ID of this connector instance.

Constructor Detail

### WarpConnector

    public WarpConnector()

  Construct a new instance of a `WarpConnector`.

Method Detail

### getContainer

    public Container getContainer()

  Return the `Container` instance which will process all requests received by this `Connector`.
  Specified by:
    getContainer in interface Connector

### setContainer

    public void setContainer(Container container)

  Set the `Container` instance which will process all requests received by this `Connector`.
  Specified by:
    setContainer in interface Connector
  Parameters:
    `container` - The new Container to use

### getEnableLookups

    public boolean getEnableLookups()

  Return the "enable DNS lookups" flag.
  Specified by:
    getEnableLookups in interface Connector

### setEnableLookups

    public void setEnableLookups(boolean enableLookups)

  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()

  Return the `ServerSocketFactory` used by this `Connector` to generate `ServerSocket` instances.
  Specified by:
    getFactory in interface Connector

### setFactory

    public void setFactory(ServerSocketFactory factory)

  Set the `ServerSocketFactory` used by this `Connector` to generate `ServerSocket` instances.
  Specified by:
    setFactory in interface Connector
  Parameters:
    `factory` - The new server socket factory

### getRedirectPort

    public int getRedirectPort()

  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)

  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()

  Return the scheme that will be assigned to requests received through this connector. Default value is "warp".
  Specified by:
    getScheme in interface Connector

### setScheme

    public void setScheme(java.lang.String scheme)

  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()

  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)

  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

### getService

    public Service getService()

  Return the `Service` with which we are associated (if any).
  Specified by:
    getService in interface Connector

### setService

    public void setService(Service service)

  Set the `Service` with which we are associated (if any).
  Specified by:
    setService in interface Connector
  Parameters:
    `service` - The service that owns this Engine

### getInfo

    public java.lang.String getInfo()

  Return descriptive information about this `Connector`.
  Specified by:
    getInfo in interface Connector

### setInfo

    public void setInfo(java.lang.String info)

  Set descriptive information about this `Connector`.

### getAddress

    public java.lang.String getAddress()

  Return the IP address to which this `Connector` will bind to.

### setAddress

    public void setAddress(java.lang.String address)

  Set the IP address to which this `Connector` will bind to.
  Parameters:
    `address` - The bind IP address

### getPort

    public int getPort()

  Return the port to which this `Connector` will bind to.

### setPort

    public void setPort(int port)

  Set the port to which this `Connector` will bind to.
  Parameters:
    `port` - The bind port

### setAddress

    public void setAddress(int port)

  Set the IP address to which this `Connector` will bind to.
  Parameters:
    `address` - The bind IP address

### getAcceptCount

    public int getAcceptCount()

  Return the accept count for this Connector.

### setAcceptCount

    public void setAcceptCount(int count)

  Set the accept count for this Connector.
  Parameters:
    `count` - The new accept count

### getAppBase

    public java.lang.String getAppBase()

  Get the applications base directory for hosts created via WARP.

### setAppBase

    public void setAppBase(java.lang.String appBase)

  Set the applications base directory for hosts created via WARP.
  Parameters:
    `appBase` - The appbase property.

### getDebug

    public int getDebug()

  Return the debug level.

### setDebug

    public void setDebug(int debug)

  Set the debug level.

### addLifecycleListener

    public void addLifecycleListener(LifecycleListener listener)

  Add a `LifecycleEvent` listener to this `Connector`.
  Specified by:
    addLifecycleListener in interface Lifecycle
  Parameters:
    `listener` - The listener to add

### findLifecycleListeners

    public LifecycleListener[] findLifecycleListeners()

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

### removeLifecycleListener

    public void removeLifecycleListener(LifecycleListener listener)

  Remove a `LifecycleEvent` listener from this `Connector`.
  Specified by:
    removeLifecycleListener in interface Lifecycle
  Parameters:
    `listener` - The listener to remove

### initialize

    public void initialize()
                    throws LifecycleException

  Initialize this connector (create ServerSocket here!)
  Specified by:
    initialize in interface Connector
  Tags copied from interface: Connector
  Throws:
    LifecycleException - If this server was already initialized.

### start

    public void start()
               throws LifecycleException

  Start accepting connections by this `Connector`.
  Specified by:
    start in interface Lifecycle
  Tags copied from interface: Lifecycle
  Throws:
    java.lang.IllegalStateException - if this component has already been started
    LifecycleException - if this component detects a fatal error that prevents this component from being used

### stop

    public void stop()
              throws LifecycleException

  Stop accepting connections by this `Connector`.
  Specified by:
    stop in interface Lifecycle
  Tags copied from interface: Lifecycle
  Throws:
    java.lang.IllegalStateException - if this component has not been started
    LifecycleException - if this component detects a fatal error that needs to be reported

### isStarted

    public boolean isStarted()

  Check whether this service was started or not.

### applicationId

    protected int applicationId(Context context)

  Return the application ID for a given `Context`.

### applicationContext

    protected Context applicationContext(int id)

  Return the application for a given ID.

### createRequest

    public Request createRequest()

  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()

  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()

  Start accepting WARP requests from the network.
  Specified by:
    run in interface java.lang.Runnable

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2001 Apache Software Foundation. All Rights Reserved.