juju.reattore.server.intercept.impl
Class PartitioningInterceptor

java.lang.Object
  |
  +--juju.reattore.server.intercept.impl.PartitioningInterceptor
All Implemented Interfaces:
Interceptor

public class PartitioningInterceptor
extends java.lang.Object
implements Interceptor

Interceptor that hands off to a different child interceptor based on the original request. Can be used to re-map directories or to add servlets. Top down only. Does not handle conflicts.
Examples:


Constructor Summary
PartitioningInterceptor()
           
 
Method Summary
 void add(java.lang.String path, Interceptor inter)
          Add a new child that handles 'path' and below.
 void addTarget(Target target)
          Configuration helper method.
 boolean process(HttpRequest req, HttpResponse resp)
          Process an incoming HTTP request if possible, filling in the given response as it goes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PartitioningInterceptor

public PartitioningInterceptor()
Method Detail

add

public void add(java.lang.String path,
                Interceptor inter)
Add a new child that handles 'path' and below.

Parameters:
path - The path the interceptor handles.
inter - The interceptor to use on match.

addTarget

public void addTarget(Target target)
Configuration helper method.

See Also:
add(java.lang.String, juju.reattore.server.intercept.Interceptor)

process

public boolean process(HttpRequest req,
                       HttpResponse resp)
Description copied from interface: Interceptor
Process an incoming HTTP request if possible, filling in the given response as it goes. An interceptor may have side effects without actually performing the main processing and may pass it on to another interceptor. A authentication interceptor is a good example.

Specified by:
process in interface Interceptor
Parameters:
req - HTTP request to process
resp - Response to fill in
Returns:
true if the request was recognised and processed.
See Also:
Interceptor


Copyright © 2002-2003 Michael Hope. All Rights Reserved.