## org.apache.catalina.core
Class FastEngineMapper

    java.lang.Object
      org.apache.catalina.core.FastEngineMapper

All Implemented Interfaces:
  ContainerListener, java.util.EventListener, Lifecycle, Mapper, java.beans.PropertyChangeListener

public final class FastEngineMapper
extends java.lang.Object
implements ContainerListener, Lifecycle, Mapper, java.beans.PropertyChangeListener

Implementation of `Mapper` for an `Engine`, designed to process HTTP requests. This mapper selects an appropriate `Host` based on the server name included in the request.

IMPLEMENTATION NOTE: This Mapper only works with a `StandardEngine`, because it relies on internal APIs.

Version:
  $Revision: 466595 $ $Date: 2006-10-21 23:24:41 +0100 (Sat, 21 Oct 2006) $
Author:
  Craig R. McClanahan

Field Summary

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

Method Summary
`void` `addLifecycleListener(LifecycleListener listener)` Add a lifecycle event listener to this component.
`void` `containerEvent(ContainerEvent event)` Acknowledge the occurrence of the specified event.
`LifecycleListener[]` `findLifecycleListeners()` Get the lifecycle listeners associated with this lifecycle.
`Container` `getContainer()` Return the Container with which this Mapper is associated.
`java.lang.String` `getProtocol()` Return the protocol for which this Mapper is responsible.
`Container` `map(Request request, boolean update)` Return the child Container that should be used to process this Request, based upon its characteristics.
`void` `propertyChange(java.beans.PropertyChangeEvent event)` Process a property change event.
`void` `removeLifecycleListener(LifecycleListener listener)` Remove a lifecycle event listener from this component.
`void` `setContainer(Container container)` Set the Container with which this Mapper is associated.
`void` `setProtocol(java.lang.String protocol)` Set the protocol for which this Mapper is responsible.
`void` `start()` Prepare for active use of the public methods of this Component.
`void` `stop()` Gracefully shut down active use of the public methods of this Component.

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

Constructor Detail

### FastEngineMapper

    public FastEngineMapper()

Method Detail

### getContainer

    public Container getContainer()

  Return the Container with which this Mapper is associated.

  Specified by:
    `getContainer` in interface `Mapper`

### setContainer

    public void setContainer(Container container)

  Set the Container with which this Mapper is associated.

  Specified by:
    `setContainer` in interface `Mapper`
  Parameters:
    `container` - The newly associated Container
  Throws:
    `java.lang.IllegalArgumentException` - if this Container is not acceptable to this Mapper

### getProtocol

    public java.lang.String getProtocol()

  Return the protocol for which this Mapper is responsible.

  Specified by:
    `getProtocol` in interface `Mapper`

### setProtocol

    public void setProtocol(java.lang.String protocol)

  Set the protocol for which this Mapper is responsible.

  Specified by:
    `setProtocol` in interface `Mapper`
  Parameters:
    `protocol` - The newly associated protocol

### map

    public Container map(Request request,
                         boolean update)

  Return the child Container that should be used to process this Request, based upon its characteristics. If no such child Container can be identified, return `null` instead.

  Specified by:
    `map` in interface `Mapper`
  Parameters:
    `request` - Request being processed
    `update` - Update the Request to reflect the mapping selection?

### containerEvent

    public void containerEvent(ContainerEvent event)

  Acknowledge the occurrence of the specified event.

  Specified by:
    `containerEvent` in interface `ContainerListener`
  Parameters:
    `event` - ContainerEvent that has occurred

### addLifecycleListener

    public void addLifecycleListener(LifecycleListener listener)

  Add a lifecycle event listener to this component.

  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.

  Specified by:
    `findLifecycleListeners` in interface `Lifecycle`

### removeLifecycleListener

    public void removeLifecycleListener(LifecycleListener listener)

  Remove a lifecycle event listener from this component.

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

### start

    public void start()
               throws LifecycleException

  Prepare for active use of the public methods of this Component.

  Specified by:
    `start` in interface `Lifecycle`
  Throws:
    `LifecycleException` - if this component detects a fatal error that prevents it from being started

### stop

    public void stop()
              throws LifecycleException

  Gracefully shut down active use of the public methods of this Component.

  Specified by:
    `stop` in interface `Lifecycle`
  Throws:
    `LifecycleException` - if this component detects a fatal error that needs to be reported

### propertyChange

    public void propertyChange(java.beans.PropertyChangeEvent event)

  Process a property change event.

  Specified by:
    `propertyChange` in interface `java.beans.PropertyChangeListener`

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