    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class org.w3c.jigsaw.frames.RelocateFrame

    java.lang.Object
       |
       +----org.w3c.tools.resources.AttributeHolder
               |
               +----org.w3c.tools.resources.Resource
                       |
                       +----org.w3c.tools.resources.FramedResource
                               |
                               +----org.w3c.tools.resources.ResourceFrame
                                       |
                                       +----org.w3c.tools.resources.ProtocolFrame
                                               |
                                               +----org.w3c.jigsaw.frames.HTTPFrame
                                                       |
                                                       +----org.w3c.jigsaw.frames.RelocateFrame

public class RelocateFrame
extends HTTPFrame

Emit a HTTP redirect.

##

ATTR_HANDLE_PATHINFO
  Attribute index - Should we also handle extra path infos ?
ATTR_LOCATION
  Attribute index - The relocation location.
ATTR_PERMANENT_REDIRECT
  Attribute index - Is the relocation permanent?
ATTR_USE_302
  Attribute index - SHould we use the ambiguous 302?
PATH_INFO
  Name of the state to hold the PATH_INFO in the request.

##

RelocateFrame()

##

checkHandlePathInfo()
  Get the path info value
checkPermanentRedirect()
  Get the permanent redirect flag
checkUse302()
  Get the "use ambigous 302 response code" flag
getLocation()
  Get the location for the relocation
getOtherResource(Request)
  Emit a redirect.
lookupOther(LookupState, LookupResult)
  Lookup the target resource when associated with an unknown resource.
registerResource(FramedResource)
  Register this frame to the given resource.

##

PATH_INFO

     public static final String PATH_INFO

  Name of the state to hold the PATH_INFO in the request.

ATTR_LOCATION

     protected static int ATTR_LOCATION

  Attribute index - The relocation location.

ATTR_HANDLE_PATHINFO

     protected static int ATTR_HANDLE_PATHINFO

  Attribute index - Should we also handle extra path infos ?

ATTR_PERMANENT_REDIRECT

     protected static int ATTR_PERMANENT_REDIRECT

  Attribute index - Is the relocation permanent?

ATTR_USE_302

     protected static int ATTR_USE_302

  Attribute index - SHould we use the ambiguous 302?

##

RelocateFrame

     public RelocateFrame()

##

getLocation

     public String getLocation()

  Get the location for the relocation

  Returns:
    a string, containing the relative path.

checkHandlePathInfo

     public boolean checkHandlePathInfo()

  Get the path info value

  Returns:
    a boolean

checkPermanentRedirect

     public boolean checkPermanentRedirect()

  Get the permanent redirect flag

  Returns:
    a boolean

checkUse302

     public boolean checkUse302()

  Get the "use ambigous 302 response code" flag

  Returns:
    a boolean

registerResource

     public void registerResource(FramedResource resource)

  Register this frame to the given resource.

  Overrides:
    registerResource in class HTTPFrame

lookupOther

     protected boolean lookupOther(LookupState ls,
                                   LookupResult lr) throws ProtocolException

  Lookup the target resource when associated with an unknown resource.

  Parameters:
    ls - The current lookup state
    lr - The result
  Returns:
    true if lookup is done.
  Throws: ProtocolException
    If an error relative to the protocol occurs
  Overrides:
    lookupOther in class HTTPFrame

getOtherResource

     protected Reply getOtherResource(Request request) throws ProtocolException

  Emit a redirect. All GET requests are redirected toward the target location.

  Parameters:
    client - The client issuing the request.
    request - The request to handle.
  Throws: ProtocolException
    If the request couldn't be handled.
  Overrides:
    getOtherResource in class HTTPFrame

    All Packages  Class Hierarchy  This Package  Previous  Next  Index