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.


Variable Index

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

Constructor Index

 o RelocateFrame()

Method Index

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

Variables

 o PATH_INFO
 public static final String PATH_INFO
Name of the state to hold the PATH_INFO in the request.

 o ATTR_LOCATION
 protected static int ATTR_LOCATION
Attribute index - The relocation location.

 o ATTR_HANDLE_PATHINFO
 protected static int ATTR_HANDLE_PATHINFO
Attribute index - Should we also handle extra path infos ?

 o ATTR_PERMANENT_REDIRECT
 protected static int ATTR_PERMANENT_REDIRECT
Attribute index - Is the relocation permanent?

 o ATTR_USE_302
 protected static int ATTR_USE_302
Attribute index - SHould we use the ambiguous 302?

Constructors

 o RelocateFrame
 public RelocateFrame()

Methods

 o getLocation
 public String getLocation()
Get the location for the relocation

Returns:
a string, containing the relative path.
 o checkHandlePathInfo
 public boolean checkHandlePathInfo()
Get the path info value

Returns:
a boolean
 o checkPermanentRedirect
 public boolean checkPermanentRedirect()
Get the permanent redirect flag

Returns:
a boolean
 o checkUse302
 public boolean checkUse302()
Get the "use ambigous 302 response code" flag

Returns:
a boolean
 o registerResource
 public void registerResource(FramedResource resource)
Register this frame to the given resource.

Overrides:
registerResource in class HTTPFrame
 o 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
 o 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