Java Doc for HTTPFrame.java in  » Web-Server » Jigsaw » org » w3c » jigsaw » frames » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Web Server » Jigsaw » org.w3c.jigsaw.frames 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.w3c.tools.resources.ProtocolFrame
   org.w3c.jigsaw.frames.HTTPFrame

All known Subclasses:   org.w3c.jigsaw.frames.NegotiatedFrame,  org.w3c.jigsaw.proxy.ForwardFrame,  org.w3c.jigsaw.status.StatisticsFrame,  org.w3c.jigedit.frames.CvsFileFrame,  org.w3c.jigsaw.frames.JpegComFrame,  org.w3c.jigsaw.tutorials.FancyFrame,  org.w3c.jigsaw.frames.HTTPExtFrame,  org.w3c.jigsaw.servlet.ServletDirectoryFrame,  org.w3c.jigsaw.frames.RedirecterFrame,  org.w3c.jigsaw.admin.BrokerFrame,  org.w3c.jigsaw.frames.VirtualHostFrame,  org.w3c.jigsaw.servlet.ServletWrapperFrame,  org.w3c.jigsaw.pagecompile.PageCompileFrame,  org.w3c.jigsaw.resources.CheckpointFrame,  org.w3c.jigsaw.status.ThreadStatFrame,  org.w3c.jigsaw.frames.JpegXMPFrame,  org.w3c.jigsaw.frames.LatestChildRedirectFrame,  org.w3c.jigsaw.frames.PostableFrame,  org.w3c.jigsaw.frames.AsIsFrame,  org.w3c.jigsaw.frames.RelocateFrame,  org.w3c.jigsaw.resources.DirectoryListerFrame,  org.w3c.jigsaw.servlet.ServletMapperFrame,  org.w3c.jigsaw.ssi.SSIFrame,  org.w3c.jigsaw.zip.ZipFrame,  org.w3c.jigsaw.proxy.Stats,
HTTPFrame
public class HTTPFrame extends ProtocolFrame (Code)
Default class to handle the HTTP protocol, manage FileResource and DirectoryResource.


Field Summary
protected static  intATTR_ALLOW_DEL
    
protected static  intATTR_BROWSABLE
     Attribute index - Allow the GNN browse method.
protected static  intATTR_CHARSET
     Attribute index - The index for the charset attribute.
protected static  intATTR_CONTENT_ENCODING
     Attribute index - The index for the content encodings attribute.
protected static  intATTR_CONTENT_LANGUAGE
     Attribute index - The index for the content languages attribute.
protected static  intATTR_CONTENT_LENGTH
     Attribute index - The index for the content length attribute.
protected static  intATTR_CONTENT_TYPE
     Attribute index - The index for the content type attribute.
protected static  intATTR_ICON
     Attribute index - The icon (if any) associated to the resource.
protected static  intATTR_ICONDIR
     Attribute index - The icon directory to use in dir listing.
protected static  intATTR_INDEX
     Attribute index - our index resource name.
protected static  intATTR_INDEXES
     Attribute index - our indexes resource name.
protected static  intATTR_MAXAGE
     Attribute index - Max age: the maximum drift allowed from reality.
protected static  intATTR_MD5
    
protected static  intATTR_PUTABLE
     Attribute index - Do we allow PUT method on this file.
protected static  intATTR_QUALITY
     Attributes index - The index for the quality attribute.
protected static  intATTR_RELOCATE
     Attribute index - The index for our relocate attribute.
protected static  intATTR_STYLE_LINK
    
protected static  intATTR_TITLE
     Attribute index - The index for the title attribute.
final public static  intCOND_FAILED
     Condition check return code - Condition existed but failed.
final public static  intCOND_OK
     Condition check return code - Condition existed and succeeded.
final public static  intCOND_WEAK
     Condition check return code - Condition existed and succeeded but is a weak validation.
final public static  StringSTATE_CONTENT_LOCATION
    
protected  booleanacceptRanges
     Does this resource support byte ranges.
protected  HttpTokenListallowed
    
protected static  MimeTypebrowsetype
     The Browse Mime type.
 HttpTokenListcontentencoding
    
 HttpTokenListcontentlanguage
    
 HttpIntegercontentlength
    
 HttpMimeTypecontenttype
    
protected  DirectoryResourcedresource
    
 HttpEntityTagetag
    
protected  FileResourcefresource
    
 HttpDatelastmodified
    
protected  HtmlGeneratorlisting
     Our current (cached) directory listing.
protected  longlisting_stamp
     The time at which we generated the directory index.
 HttpStringmd5Digest
    


Method Summary
public  voidaddStyleSheet(HtmlGenerator g)
     Add our own Style Sheet to the HtmlGenerator.
public  voidattributeChanged(AttributeChangedEvent evt)
     Listen its resource.
public  Replybrowse(Request request)
     A present to GNNPress users ! This method implements the BROWSE method that AOL press (or GNN press, or whatever its last name is) expects.
Parameters:
  request - The request to process.
exception:
  ProtocolException - If some error occurs.
public  booleancheckExpect(Request request)
     Check the Expect condition of that request
Parameters:
  request - The request to check.
public  intcheckIfMatch(Request request)
     Check the If-Match condition of that request.
Parameters:
  request - The request to check.
public  intcheckIfModifiedSince(Request request)
     Check the If-Modified-Since condition of that request.
Parameters:
  request - The request to check.
public  intcheckIfNoneMatch(Request request)
     Check the If-None-Match condition of that request.
Parameters:
  request - The request to check.
public  intcheckIfUnmodifiedSince(Request request)
     Check the If-Unmodified-Since condition of that request.
Parameters:
  request - The request to check.
public  booleancheckRequest(RequestInterface request)
     Check the request.
Parameters:
  request - the incomming request.
public  intcheckValidators(Request request)
    
public  booleancomputeContainerListing(boolean refresh)
    
public  StringcomputeETag()
    
protected  FilecomputeTrashDir(File dir)
    
protected  FilecomputeTrashFile(File file)
    
public  ReplycreateDefaultReply(Request request, int status)
     Create a reply to answer to request on this file. This method will create a suitable reply (matching the given request) and will set all its default header values to the appropriate values.
Parameters:
  request - The request to make a reply for.
protected  ReplycreateFileReply(Request request)
     Create the reply relative to the given file.
Parameters:
  request - the incomming request.
public  Replydelete(Request request)
     The default DELETE method, actually the resource (file, directory) is moved into the trash directory which is not accessible via HTTP.
protected  ReplydeleteDirectoryResource(Request request)
     Perform a DELETE for the associated DirectoryResource.
Parameters:
  request - the incomming request.
protected  ReplydeleteFileResource(Request request)
     Perform a DELETE for the associated FileResource.
Parameters:
  request - the incomming request.
protected  ReplydeleteMe(Request request)
    
protected  ReplydeleteOtherResource(Request request)
     Perform a DELETE for the associated resource.
Parameters:
  request - the incomming request.
public  Replyextended(Request request)
    
public  Replyget(Request request)
     The default GET method.
protected  HttpTokenListgetAllow()
    
public  booleangetAllowDeleteFlag()
    
public  booleangetBrowsableFlag()
     Get this class browsable flag.
protected synchronized  MimeTypegetBrowseType()
     Get the Browse Mime type.
public  StringgetCharset()
     Get this resource charset.
public  StringgetContentEncoding()
     Get this resource content encoding.
public  StringgetContentLanguage()
     Get this resource content language.
public  intgetContentLength()
     Get this resource content length.
public  MimeTypegetContentType()
     Get this resource content type.
public  ReplygetDirectoryListing(Request request)
     Reply with an HTML doc listing the resources of this container. This function takes special care not to regenerate a listing when one is available.
public  DirectoryResourcegetDirectoryResource()
    
protected  ReplygetDirectoryResource(Request request)
     Perform a GET for the associated DirectoryResource.
Parameters:
  request - the incomming request.
public  HttpEntityTaggetETag()
    
public  FileResourcegetFileResource()
    
protected  ReplygetFileResource(Request request)
     Get for FileResource
Parameters:
  request - the incomming request.
public  StringgetHelpURL()
     Get this resource's help url.
public  StringgetHelpURL(String topic)
     Get the help URL for that resource's attribute.
Parameters:
  topic - The topic (can be an attribute name, or a property, etc).
public  StringgetIcon()
     Get this resource's icon.
public  StringgetIconDirectory()
     Get the optional icon directory.
public  StringgetIndex()
     Get the optional main index name for this directory listing.
public  String[]getIndexes()
     Get the optional index name array for this directory listing.
public  booleangetMD5Flag()
    
public  longgetMaxAge()
     Get this resource's max age.
protected  ReplygetOtherResource(Request request)
    
public  booleangetPutableFlag()
    
public  doublegetQuality()
     Get this resource quality.
public  booleangetRelocateFlag()
     Should we relocate invalid requests to this directory.
public  StringgetStyleSheetURL()
    
public  StringgetTitle()
     Get this resource title.
public  URLgetURL(Request request)
     Get the full URL for that resource.
public  ReplyhandleRangeRequest(Request request, HttpRange r)
    
public  Replyhead(Request request)
     The default HEAD method replies does a GET and removes entity.
protected  ReplyheadDirectoryResource(Request request)
     Perform a HEAD request for the associated DirectoryResource.
Parameters:
  request - the incomming request.
protected  ReplyheadFileResource(Request request)
     Perform a HEAD request for the associated FileResource.
Parameters:
  request - the incomming request.
protected  ReplyheadOtherResource(Request request)
     Perform a HEAD request for the associated resource.
Parameters:
  request - the incomming request.
public  voidinitialize(Hashtable defs)
     Initialization method for attribute holders.
public  Replylink(Request request)
     The default LINK method replies with a not implemented.
public  booleanlookup(LookupState ls, LookupResult lr)
     Lookup the target resource.
protected  booleanlookupDirectory(LookupState ls, LookupResult lr)
     Lookup the target resource when associated with a DirectoryResource.
protected  booleanlookupFile(LookupState ls, LookupResult lr)
     Lookup the target resource when associated with a FileResource.
protected  booleanlookupOther(LookupState ls, LookupResult lr)
     Lookup the target resource when associated with an unknown resource.
protected  booleanlookupResource(LookupState ls, LookupResult lr)
     Lookup the target resource (dispath to more specific lookup methods).
public  Replyoptions(Request request)
     The default OPTIONS method replies with a not implemented.
public  ReplyInterfaceperform(RequestInterface req)
    
protected  ReplyInterfaceperformFrames(RequestInterface request)
     Perform the request on all the frames of that resource.
public  voidpickleValues(Hashtable defs)
     Set the values.
public  Replypost(Request request)
     The default POST method replies with a not implemented.
public  Replyput(Request request)
     The default PUT method.
protected  ReplyputFileResource(Request request)
     Change the content of the associated FileResource.
protected  ReplyputOtherResource(Request request)
     Always throw a ProtocolException.
Parameters:
  request - The incmming request.
public  voidregisterOtherResource(FramedResource resource)
     use this one instead of registerResource if the resource type doesn't matter or if this is not a file or a directory resource.
public  voidregisterResource(FramedResource resource)
     Register this frame to the given resource.
public synchronized  voidsetValue(int idx, Object value)
     Catch setValue, to maintain cached header values correctness.
public  Replytrace(Request request)
    
public  Replyunlink(Request request)
     The default UNLINK method replies with a not implemented.
public  doubleunsafeGetQuality()
     Get this resource quality.
protected  voidupdateCachedHeaders()
     Update the cached headers value.

Field Detail
ATTR_ALLOW_DEL
protected static int ATTR_ALLOW_DEL(Code)
Attribute index - delete allowed for the associated resource ?



ATTR_BROWSABLE
protected static int ATTR_BROWSABLE(Code)
Attribute index - Allow the GNN browse method.



ATTR_CHARSET
protected static int ATTR_CHARSET(Code)
Attribute index - The index for the charset attribute.



ATTR_CONTENT_ENCODING
protected static int ATTR_CONTENT_ENCODING(Code)
Attribute index - The index for the content encodings attribute.



ATTR_CONTENT_LANGUAGE
protected static int ATTR_CONTENT_LANGUAGE(Code)
Attribute index - The index for the content languages attribute.



ATTR_CONTENT_LENGTH
protected static int ATTR_CONTENT_LENGTH(Code)
Attribute index - The index for the content length attribute.



ATTR_CONTENT_TYPE
protected static int ATTR_CONTENT_TYPE(Code)
Attribute index - The index for the content type attribute.



ATTR_ICON
protected static int ATTR_ICON(Code)
Attribute index - The icon (if any) associated to the resource.



ATTR_ICONDIR
protected static int ATTR_ICONDIR(Code)
Attribute index - The icon directory to use in dir listing.



ATTR_INDEX
protected static int ATTR_INDEX(Code)
Attribute index - our index resource name.



ATTR_INDEXES
protected static int ATTR_INDEXES(Code)
Attribute index - our indexes resource name.



ATTR_MAXAGE
protected static int ATTR_MAXAGE(Code)
Attribute index - Max age: the maximum drift allowed from reality.



ATTR_MD5
protected static int ATTR_MD5(Code)
Attribute index - Send MD5 Digest: the md5 digest of the resource sent



ATTR_PUTABLE
protected static int ATTR_PUTABLE(Code)
Attribute index - Do we allow PUT method on this file.



ATTR_QUALITY
protected static int ATTR_QUALITY(Code)
Attributes index - The index for the quality attribute.



ATTR_RELOCATE
protected static int ATTR_RELOCATE(Code)
Attribute index - The index for our relocate attribute.



ATTR_STYLE_LINK
protected static int ATTR_STYLE_LINK(Code)
Attribute index - Style sheet for directory listing



ATTR_TITLE
protected static int ATTR_TITLE(Code)
Attribute index - The index for the title attribute.



COND_FAILED
final public static int COND_FAILED(Code)
Condition check return code - Condition existed but failed.



COND_OK
final public static int COND_OK(Code)
Condition check return code - Condition existed and succeeded.



COND_WEAK
final public static int COND_WEAK(Code)
Condition check return code - Condition existed and succeeded but is a weak validation.



STATE_CONTENT_LOCATION
final public static String STATE_CONTENT_LOCATION(Code)



acceptRanges
protected boolean acceptRanges(Code)
Does this resource support byte ranges.



allowed
protected HttpTokenList allowed(Code)
Methods allowed by instances of that class in particular:



browsetype
protected static MimeType browsetype(Code)
The Browse Mime type.



contentencoding
HttpTokenList contentencoding(Code)



contentlanguage
HttpTokenList contentlanguage(Code)



contentlength
HttpInteger contentlength(Code)



contenttype
HttpMimeType contenttype(Code)



dresource
protected DirectoryResource dresource(Code)
The associated DirectoryResource (if any)



etag
HttpEntityTag etag(Code)



fresource
protected FileResource fresource(Code)
The associated FileResource (if any)



lastmodified
HttpDate lastmodified(Code)



listing
protected HtmlGenerator listing(Code)
Our current (cached) directory listing.



listing_stamp
protected long listing_stamp(Code)
The time at which we generated the directory index.



md5Digest
HttpString md5Digest(Code)





Method Detail
addStyleSheet
public void addStyleSheet(HtmlGenerator g)(Code)
Add our own Style Sheet to the HtmlGenerator.
Parameters:
  g - The HtmlGenerator.



attributeChanged
public void attributeChanged(AttributeChangedEvent evt)(Code)
Listen its resource.



browse
public Reply browse(Request request) throws ProtocolException(Code)
A present to GNNPress users ! This method implements the BROWSE method that AOL press (or GNN press, or whatever its last name is) expects.
Parameters:
  request - The request to process.
exception:
  ProtocolException - If some error occurs. A Reply instance.



checkExpect
public boolean checkExpect(Request request)(Code)
Check the Expect condition of that request
Parameters:
  request - The request to check. A boolean true if the requirement is known



checkIfMatch
public int checkIfMatch(Request request)(Code)
Check the If-Match condition of that request.
Parameters:
  request - The request to check. An integer, either COND_FAILED if conditionwas checked, but failed, COND_OK if condition was checkedand succeeded, or 0 if the condition was not checkedat all (eg because the resource or the request didn't support it).



checkIfModifiedSince
public int checkIfModifiedSince(Request request)(Code)
Check the If-Modified-Since condition of that request.
Parameters:
  request - The request to check. An integer, either COND_FAILED if conditionwas checked, but failed, COND_OK if condition was checkedand succeeded, or 0 if the condition was not checkedat all (eg because the resource or the request didn't support it).



checkIfNoneMatch
public int checkIfNoneMatch(Request request)(Code)
Check the If-None-Match condition of that request.
Parameters:
  request - The request to check. An integer, either COND_FAILED if conditionwas checked, but failed, COND_OK if condition was checkedand succeeded, or 0 if the condition was not checkedat all (eg because the resource or the request didn't support it).



checkIfUnmodifiedSince
public int checkIfUnmodifiedSince(Request request)(Code)
Check the If-Unmodified-Since condition of that request.
Parameters:
  request - The request to check. An integer, either COND_FAILED if conditionwas checked, but failed, COND_OK if condition was checkedand succeeded, or 0 if the condition was not checkedat all (eg because the resource or the request didn't support it).



checkRequest
public boolean checkRequest(RequestInterface request)(Code)
Check the request.
Parameters:
  request - the incomming request. true if the request is an HTTP Request.



checkValidators
public int checkValidators(Request request)(Code)
check the validators namely LMT/Etags according to rfc2616 rules An integer, either COND_FAILED if conditionwas checked, but failed, COND_OK if condition was checkedand succeeded, or 0 if the condition was not checkedat all (eg because the resource or the request didn't support it).



computeContainerListing
public boolean computeContainerListing(boolean refresh)(Code)
Get ContainerResource listing
Parameters:
  refresh - should we refresh the listing? a boolean (true if refreshed)



computeETag
public String computeETag()(Code)
Compute the ETag string a string or null if not applicable



computeTrashDir
protected File computeTrashDir(File dir)(Code)



computeTrashFile
protected File computeTrashFile(File file)(Code)



createDefaultReply
public Reply createDefaultReply(Request request, int status)(Code)
Create a reply to answer to request on this file. This method will create a suitable reply (matching the given request) and will set all its default header values to the appropriate values.
Parameters:
  request - The request to make a reply for. An instance of Reply, suited to answer this request.



createFileReply
protected Reply createFileReply(Request request) throws ProtocolException, ResourceException(Code)
Create the reply relative to the given file.
Parameters:
  request - the incomming request. A Reply instance
exception:
  ProtocolException - If processsing the request failed.
exception:
  ResourceException - If the resource got a fatal error.



delete
public Reply delete(Request request) throws ProtocolException, ResourceException(Code)
The default DELETE method, actually the resource (file, directory) is moved into the trash directory which is not accessible via HTTP.
Parameters:
  request - The request to handle.
exception:
  ProtocolException - If processsing the request failed.
exception:
  ResourceException - If the resource got a fatal error.



deleteDirectoryResource
protected Reply deleteDirectoryResource(Request request) throws ProtocolException, ResourceException(Code)
Perform a DELETE for the associated DirectoryResource.
Parameters:
  request - the incomming request. A Reply instance.
exception:
  ProtocolException - if request processing failed.
exception:
  ResourceException - If the resource got a fatal error.



deleteFileResource
protected Reply deleteFileResource(Request request) throws ProtocolException, ResourceException(Code)
Perform a DELETE for the associated FileResource.
Parameters:
  request - the incomming request. A Reply instance.
exception:
  ProtocolException - if request processing failed.
exception:
  ResourceException - If the resource got a fatal error.



deleteMe
protected Reply deleteMe(Request request) throws HTTPException(Code)
Alway throws an HTTPException



deleteOtherResource
protected Reply deleteOtherResource(Request request) throws ProtocolException, ResourceException(Code)
Perform a DELETE for the associated resource.
Parameters:
  request - the incomming request. A Reply instance.
exception:
  ProtocolException - if request processing failed.
exception:
  ResourceException - If the resource got a fatal error.



extended
public Reply extended(Request request) throws ProtocolException, ResourceException(Code)



get
public Reply get(Request request) throws ProtocolException, ResourceException(Code)
The default GET method.
Parameters:
  request - The request to handle.
exception:
  ProtocolException - If processsing the request failed.
exception:
  ResourceException - If the resource got a fatal error.



getAllow
protected HttpTokenList getAllow()(Code)
get the Allowed methods for this resource an HttpTokenList



getAllowDeleteFlag
public boolean getAllowDeleteFlag()(Code)
delete allowed for the associated resource ?



getBrowsableFlag
public boolean getBrowsableFlag()(Code)
Get this class browsable flag.



getBrowseType
protected synchronized MimeType getBrowseType()(Code)
Get the Browse Mime type.



getCharset
public String getCharset()(Code)
Get this resource charset. A String, or null if notdefined.



getContentEncoding
public String getContentEncoding()(Code)
Get this resource content encoding. The content encoding of a resource is stored as a comma separated list of tokens (as decribed in the Content_encoding header of the HTTP specification, and in the order they should appear in the header). A string of comma separated encoding tokens, ornull if not defined.



getContentLanguage
public String getContentLanguage()(Code)
Get this resource content language. Language are stored as a comma separated String of tokens. A comma separated string of language tokens, ornull if undefined.



getContentLength
public int getContentLength()(Code)
Get this resource content length. The resource content length, or -1 if notdefined.



getContentType
public MimeType getContentType()(Code)
Get this resource content type. An instance of MIMEType, or null if notdefined.



getDirectoryListing
public Reply getDirectoryListing(Request request) throws ProtocolException, ResourceException(Code)
Reply with an HTML doc listing the resources of this container. This function takes special care not to regenerate a listing when one is available. It also caches the date of the listing, so that it can win big with NOT_MODIFIED.

Using a modem, I know that each place I can reply with an NOT_MODIFIED, is a big win.
Parameters:
  request - The request to handle.
exception:
  ProtocolException - If processsing the request failed.
exception:
  ResourceException - If the resource got a fatal error.




getDirectoryResource
public DirectoryResource getDirectoryResource()(Code)
Get the associated DirectoryResource (if any) a DirectoryResource instance or nullif no DirectoryResource is associated with this frame.



getDirectoryResource
protected Reply getDirectoryResource(Request request) throws ProtocolException, ResourceException(Code)
Perform a GET for the associated DirectoryResource.
Parameters:
  request - the incomming request. A Reply instance.
exception:
  ProtocolException - if request processing failed.
exception:
  ResourceException - If the resource got a fatal error.



getETag
public HttpEntityTag getETag()(Code)
Get this resource Etag an instance of HttpEntityTag, or null if notdefined.



getFileResource
public FileResource getFileResource()(Code)
Get the associated FileResource (if any) a FileResource instance or nullif no FileResource is associated with this frame.



getFileResource
protected Reply getFileResource(Request request) throws ProtocolException, ResourceException(Code)
Get for FileResource
Parameters:
  request - the incomming request. A Reply instance
exception:
  ProtocolException - If processsing the request failed.
exception:
  ResourceException - If the resource got a fatal error.



getHelpURL
public String getHelpURL()(Code)
Get this resource's help url. An URL, encoded as a String, or null if notavailable.



getHelpURL
public String getHelpURL(String topic)(Code)
Get the help URL for that resource's attribute.
Parameters:
  topic - The topic (can be an attribute name, or a property, etc). A String encoded URL, or null.



getIcon
public String getIcon()(Code)
Get this resource's icon.



getIconDirectory
public String getIconDirectory()(Code)
Get the optional icon directory.



getIndex
public String getIndex()(Code)
Get the optional main index name for this directory listing. The name of the resource responsible to list that container.



getIndexes
public String[] getIndexes()(Code)
Get the optional index name array for this directory listing. The index name array (including the main index)
See Also:   HTTPFrame.getIndex



getMD5Flag
public boolean getMD5Flag()(Code)
Do we send the MD5 digest?



getMaxAge
public long getMaxAge()(Code)
Get this resource's max age. The max age of a resource indicates how much drift is allowed between the physicall version of the resource, and any in-memory cached version of it.

The max age attribute is a long number giving the number of milliseconds of allowed drift.




getOtherResource
protected Reply getOtherResource(Request request) throws ProtocolException, ResourceException(Code)
The default GET method for other king of associated resource
Parameters:
  request - The request to handle.
exception:
  ProtocolException - If processsing the request failed.
exception:
  ResourceException - If the resource got a fatal error.



getPutableFlag
public boolean getPutableFlag()(Code)
Get the PUT'able flag (are we allow to PUT to the resource ?)



getQuality
public double getQuality()(Code)
Get this resource quality. The resource quality, or some negative value if not defined.



getRelocateFlag
public boolean getRelocateFlag()(Code)
Should we relocate invalid requests to this directory. A boolean true if we should relocate.



getStyleSheetURL
public String getStyleSheetURL()(Code)
Get this frame style sheet link



getTitle
public String getTitle()(Code)
Get this resource title. This resource's title, or null if not defined.



getURL
public URL getURL(Request request)(Code)
Get the full URL for that resource. An URL instance.



handleRangeRequest
public Reply handleRangeRequest(Request request, HttpRange r) throws ProtocolException(Code)
handles a Range Request request, the request r, the HttpRange a Reply if range is valid, or null if there is a change in theresource, or if the HttpRange is not valid ( 4-2, for example).
exception:
  ProtocolException - If processsing the request failed.



head
public Reply head(Request request) throws ProtocolException, ResourceException(Code)
The default HEAD method replies does a GET and removes entity.
Parameters:
  request - The request to handle.
exception:
  ProtocolException - Always thrown, to return a NOT_IMPLEMENTEDerror.
exception:
  ResourceException - If the resource got a fatal error.



headDirectoryResource
protected Reply headDirectoryResource(Request request) throws ProtocolException, ResourceException(Code)
Perform a HEAD request for the associated DirectoryResource.
Parameters:
  request - the incomming request. A Reply instance
exception:
  ProtocolException - If processsing the request failed.
exception:
  ResourceException - If the resource got a fatal error.



headFileResource
protected Reply headFileResource(Request request) throws ProtocolException, ResourceException(Code)
Perform a HEAD request for the associated FileResource.
Parameters:
  request - the incomming request. A Reply instance
exception:
  ProtocolException - If processsing the request failed.
exception:
  ResourceException - If the resource got a fatal error.



headOtherResource
protected Reply headOtherResource(Request request) throws ProtocolException, ResourceException(Code)
Perform a HEAD request for the associated resource.
Parameters:
  request - the incomming request. A Reply instance
exception:
  ProtocolException - If processsing the request failed.
exception:
  ResourceException - If the resource got a fatal error.



initialize
public void initialize(Hashtable defs)(Code)
Initialization method for attribute holders. This method allows to initialize an attribute holder by providing its attributes values through a Hashtable mapping attribute names to attribute values.
Parameters:
  defs - The Hashtable containing the default values.



link
public Reply link(Request request) throws ProtocolException, ResourceException(Code)
The default LINK method replies with a not implemented.
Parameters:
  request - The request to handle.
exception:
  ProtocolException - Always thrown, to return a NOT_IMPLEMENTEDerror.
exception:
  ResourceException - If the resource got a fatal error.



lookup
public boolean lookup(LookupState ls, LookupResult lr) throws ProtocolException(Code)
Lookup the target resource. Lookup filters and then resource.
Parameters:
  ls - The current lookup state
Parameters:
  lr - The result true if lookup is done.
exception:
  ProtocolException - If an error relative to the protocol occurs
See Also:   org.w3c.tools.resources.ResourceFrame.lookupFilters
See Also:   HTTPFrame.lookupResource



lookupDirectory
protected boolean lookupDirectory(LookupState ls, LookupResult lr) throws ProtocolException(Code)
Lookup the target resource when associated with a DirectoryResource.
Parameters:
  ls - The current lookup state
Parameters:
  lr - The result true if lookup is done.
exception:
  ProtocolException - If an error relative to the protocoloccurs



lookupFile
protected boolean lookupFile(LookupState ls, LookupResult lr) throws ProtocolException(Code)
Lookup the target resource when associated with a FileResource.
Parameters:
  ls - The current lookup state
Parameters:
  lr - The result true if lookup is done.
exception:
  ProtocolException - If an error relative to the protocol occurs



lookupOther
protected boolean lookupOther(LookupState ls, LookupResult lr) throws ProtocolException(Code)
Lookup the target resource when associated with an unknown resource.
Parameters:
  ls - The current lookup state
Parameters:
  lr - The result true if lookup is done.
exception:
  ProtocolException - If an error relative to the protocol occurs



lookupResource
protected boolean lookupResource(LookupState ls, LookupResult lr) throws ProtocolException(Code)
Lookup the target resource (dispath to more specific lookup methods).
Parameters:
  ls - The current lookup state
Parameters:
  lr - The result true if lookup is done.
exception:
  ProtocolException - If an error relative to the protocol occurs
See Also:   HTTPFrame.lookupDirectory
See Also:   HTTPFrame.lookupFile
See Also:   HTTPFrame.lookupOther



options
public Reply options(Request request) throws ProtocolException, ResourceException(Code)
The default OPTIONS method replies with a not implemented.
Parameters:
  request - The request to handle.
exception:
  ProtocolException - In case of errors.
exception:
  ResourceException - If the resource got a fatal error.



perform
public ReplyInterface perform(RequestInterface req) throws ProtocolException, ResourceException(Code)
Perform the request
Parameters:
  req - The request to handle.
exception:
  ProtocolException - If processsing the request failed.
exception:
  ResourceException - If the resource got a fatal error.



performFrames
protected ReplyInterface performFrames(RequestInterface request) throws ProtocolException, ResourceException(Code)
Perform the request on all the frames of that resource. The Reply returned is the first non-null reply.
Parameters:
  request - A RequestInterface instance. A ReplyInterface instance.
exception:
  ProtocolException - If an error relative to the protocol occurs
exception:
  ResourceException - If an error not relative to the protocol occurs



pickleValues
public void pickleValues(Hashtable defs)(Code)
Set the values. (MUST be called before initialize).
Parameters:
  defs - The Hashtable containing the values.



post
public Reply post(Request request) throws ProtocolException, ResourceException(Code)
The default POST method replies with a not implemented.
Parameters:
  request - The request to handle.
exception:
  ProtocolException - Always thrown, to return a NOT_IMPLEMENTEDerror.
exception:
  ResourceException - If the resource got a fatal error.



put
public Reply put(Request request) throws ProtocolException, ResourceException(Code)
The default PUT method.
Parameters:
  request - The request to handle.
exception:
  ProtocolException - If processsing the request failed.
exception:
  ResourceException - If the resource got a fatal error.



putFileResource
protected Reply putFileResource(Request request) throws ProtocolException, ResourceException(Code)
Change the content of the associated FileResource.
Parameters:
  request - The incomming request.
exception:
  org.w3c.tools.resources.ProtocolException - if a protocol error occurs
exception:
  ResourceException - If the resource got a fatal error.



putOtherResource
protected Reply putOtherResource(Request request) throws ProtocolException(Code)
Always throw a ProtocolException.
Parameters:
  request - The incmming request. a Reply instance.
exception:
  ProtocolException - (Always thrown).



registerOtherResource
public void registerOtherResource(FramedResource resource)(Code)
use this one instead of registerResource if the resource type doesn't matter or if this is not a file or a directory resource. In subclasses you should have to do that:
 public void registerResource(FramedResource resource) {
 super.registerOtherResource(resource);
 }
 

Parameters:
  the - resource to register.



registerResource
public void registerResource(FramedResource resource)(Code)
Register this frame to the given resource.
Parameters:
  resource - The resource associated with this frame.



setValue
public synchronized void setValue(int idx, Object value)(Code)
Catch setValue, to maintain cached header values correctness.
Parameters:
  idx - The index of the attribute to be set.
Parameters:
  value - The new value for the attribute.



trace
public Reply trace(Request request) throws HTTPException, ClientException(Code)
The default TRACE method replies with a not implemented
Parameters:
  request - The request to handle.
exception:
  HTTPException - In case of errors.
exception:
  ClientException - If the client instance controling therequest processing got a fatal error.



unlink
public Reply unlink(Request request) throws ProtocolException, ResourceException(Code)
The default UNLINK method replies with a not implemented.
Parameters:
  request - The request to handle.
exception:
  ProtocolException - Always thrown, to return a NOT_IMPLEMENTEDerror.
exception:
  ResourceException - If the resource got a fatal error.



unsafeGetQuality
public double unsafeGetQuality()(Code)
Get this resource quality. The resource quality, or some negative value if not defined.



updateCachedHeaders
protected void updateCachedHeaders()(Code)
Update the cached headers value. Each resource maintains a set of cached values for headers, this allows for a nice sped-up in headers marshalling, which - as the complexity of the protocol increases - becomes a bottleneck.




www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.