    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class w3c.jigsaw.resources.VirtualHostResource

    java.lang.Object
       |
       +----w3c.tools.store.AttributeHolder
               |
               +----w3c.tools.store.Resource
                       |
                       +----w3c.jigsaw.resources.HTTPResource
                               |
                               +----w3c.jigsaw.resources.FilteredResource
                                       |
                                       +----w3c.jigsaw.resources.ContainerResource
                                               |
                                               +----w3c.jigsaw.resources.StoreContainer
                                                       |
                                                       +----w3c.jigsaw.resources.VirtualHostResource

public class VirtualHostResource
extends StoreContainer

##

ATTR_FOLLOWUP
  Attribute index - The default root (for unknown hosts)
defs
followup

##

VirtualHostResource()

##

createDefaultResource(String)
  Create a default resource for that container.
getFollowup()
  Get the name of the resource used as a followup.
initialize(Object[])
  Initialize ourself.
lookup(LookupState, LookupResult)
  Lookup the virtual host resource to continue lookup.
lookupFollowup()
  Lookup the followup resource.
lookupStore(String)
  Resolve the given name in our store.
perform(Request)
  Dispatch the given request to the appropriate method.
registerResource(String, Resource, Hashtable)
  Register a new host within that container.

##

ATTR_FOLLOWUP

     protected static int ATTR_FOLLOWUP

  Attribute index - The default root (for unknown hosts)

followup

     protected HTTPResource followup

defs

     protected Hashtable defs

##

VirtualHostResource

     public VirtualHostResource()

##

createDefaultResource

     public HTTPResource createDefaultResource(String name)

  Create a default resource for that container. This method will just fail, since they are no there is no specific resource class to be attached to that class of resources.

  Parameters:
    name - The name of the resource to be created.
  Returns:
    Always null.
  Overrides:
    createDefaultResource in class ContainerResource

registerResource

     public synchronized void registerResource(String id,
                                               Resource resource,
                                               Hashtable defs)

  Register a new host within that container. The host identifier (which matches the host name) is case lowered, so that we can perform case insensitive comparison of host names.

  Parameters:
    id - The name of the new host (includes port number).
    resource - The resource for handling that host (un-initialized).
    defs - Default attribute values.
  Overrides:
    registerResource in class StoreContainer

lookupStore

     protected synchronized HTTPResource lookupStore(String host) throws InvalidResourceException

  Resolve the given name in our store.

  Parameters:
    name - The name to resolve.
  Overrides:
    lookupStore in class StoreContainer

getFollowup

     public String getFollowup()

  Get the name of the resource used as a followup.

  Returns:
    A String giving the name of the resource to be used as the default.

lookupFollowup

     public synchronized HTTPResource lookupFollowup()

  Lookup the followup resource.

  Returns:
    The loaded resource for the current followup.

lookup

     public boolean lookup(LookupState ls,
                           LookupResult lr) throws HTTPException

  Lookup the virtual host resource to continue lookup. This is one of the neatest piece of code that Jigsaw allows you to write.

  Overrides:
    lookup in class StoreContainer

perform

     public Reply perform(Request request) throws HTTPException, ClientException

  Dispatch the given request to the appropriate method.

  Overrides:
    perform in class HTTPResource

initialize

     public void initialize(Object values[])

  Initialize ourself.

  Overrides:
    initialize in class StoreContainer

    All Packages  Class Hierarchy  This Package  Previous  Next  Index