All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.jigsaw.proxy.ForwardDirectory

java.lang.Object
   |
   +----w3c.tools.store.AttributeHolder
           |
           +----w3c.tools.store.Resource
                   |
                   +----w3c.jigsaw.resources.HTTPResource
                           |
                           +----w3c.jigsaw.resources.FilteredResource
                                   |
                                   +----w3c.jigsaw.proxy.ForwardDirectory

public class ForwardDirectory
extends FilteredResource
A forwarder module for Jigsaw. This resource is the base class for proxying and mirroring in Jigsaw, it just provide default methods for converting server-side requests into client-side requests, and client-side replies into server-side replies.


Variable Index

 o ATTR_LOCAL_ROOT
Attribute index - The local resource, if server-wide request.
 o ATTR_RECEIVED_BY
Attribute index - The received by attribute of that proxy.
 o ATTR_TRACEREQ
Attribute index - Try to trace how the request has been processed.
 o cache_hits
Statistics - Number of hits.
 o cache_icps
Statistics - Number of ICP redirects.
 o cache_misses
Statistics - Number of misses.
 o cache_nocache
Statistics - Number of requests that didn't use cache.
 o cache_retrievals
Statistics - Number of successfull revalidations.
 o cache_revalidations
Statistics - Number of successfull revalidations.
 o lroot
Get the local root resource to use for internal requests.
 o manager
The HttpManager we use.
 o reqcount
Statistics - Number of requests handled.
 o reqerred
Statistics - Errors.

Constructor Index

 o ForwardDirectory()

Method Index

 o dupReply(Request, Reply)
Duplicate the given client side reply into a server side one.
 o dupRequest(Request)
Duplicate a server side request into a client side request.
 o getLocalRoot()
Get the local root resource name.
 o getLocalRootResource()
 o getReceivedBy()
Get the received by attribute value.
 o getTraceRequest()
Should we try to trace request path ?
 o getVia()
 o initialize(Object[])
Initialize the filters of that filtered resource.
 o notifyUnload()
This resource is being unloaded.
 o perform(Request)
Perform the given proxied request.
 o updateStatistics(Request)
Update relevant statistics (kind of a hack).

Variables

 o ATTR_LOCAL_ROOT
 protected static int ATTR_LOCAL_ROOT
Attribute index - The local resource, if server-wide request.

 o ATTR_RECEIVED_BY
 protected static int ATTR_RECEIVED_BY
Attribute index - The received by attribute of that proxy.

 o ATTR_TRACEREQ
 protected static int ATTR_TRACEREQ
Attribute index - Try to trace how the request has been processed.

 o manager
 protected HttpManager manager
The HttpManager we use.

 o cache_hits
 public int cache_hits
Statistics - Number of hits.

 o cache_misses
 public int cache_misses
Statistics - Number of misses.

 o cache_revalidations
 public int cache_revalidations
Statistics - Number of successfull revalidations.

 o cache_retrievals
 public int cache_retrievals
Statistics - Number of successfull revalidations.

 o cache_nocache
 public int cache_nocache
Statistics - Number of requests that didn't use cache.

 o reqcount
 public int reqcount
Statistics - Number of requests handled.

 o cache_icps
 public int cache_icps
Statistics - Number of ICP redirects.

 o reqerred
 public int reqerred
Statistics - Errors.

 o lroot
 protected HTTPResource lroot
Get the local root resource to use for internal requests.

Constructors

 o ForwardDirectory
 public ForwardDirectory()

Methods

 o getLocalRoot
 public String getLocalRoot()
Get the local root resource name.

 o getReceivedBy
 public String getReceivedBy()
Get the received by attribute value.

If this attribute is not defined, it will default to the name of the host running the proxy.

Returns:
A String.
 o getTraceRequest
 public boolean getTraceRequest()
Should we try to trace request path ?

Returns:
A boolean.
 o getVia
 public synchronized String getVia()
 o getLocalRootResource
 public synchronized HTTPResource getLocalRootResource()
 o updateStatistics
 protected void updateStatistics(Request r)
Update relevant statistics (kind of a hack).

 o dupRequest
 protected Request dupRequest(Request request) throws HTTPException, IOException
Duplicate a server side request into a client side request.

Parameters:
request - The server side request.
Returns:
A Client side request.
 o dupReply
 protected Reply dupReply(Request request,
                          Reply rep) throws HTTPException, IOException
Duplicate the given client side reply into a server side one. Perform any actions requested by HTTP/1.1.

Parameters:
request - The request ebing processed.
reply - The reply to clone.
Returns:
A server-side Reply instance.
Throws: HTTPException
If some HTTP errors occured in the process.
Throws: IOException
If setting the streams failed.
 o perform
 public Reply perform(Request request) throws HTTPException, ClientException
Perform the given proxied request.

Parameters:
request - The request to perform.
filters - The set of filters to apply.
Returns:
A Reply instance.
Overrides:
perform in class HTTPResource
 o notifyUnload
 public synchronized void notifyUnload()
This resource is being unloaded. Tell the HttpManager to save any pending data to stable storage.

Overrides:
notifyUnload in class Resource
 o initialize
 public void initialize(Object values[])
Initialize the filters of that filtered resource.

Overrides:
initialize in class FilteredResource

All Packages  Class Hierarchy  This Package  Previous  Next  Index