Java Doc for NegotiatedFrame.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.jigsaw.frames.HTTPFrame
   org.w3c.jigsaw.frames.NegotiatedFrame

NegotiatedFrame
public class NegotiatedFrame extends HTTPFrame (Code)
Content negotiation.

Inner Class :class VariantState

Field Summary
protected static  intATTR_PARANOID_VARIANT_CHECK
    
protected static  intATTR_PUT_POLICY
    
protected static  intATTR_VARIANTS
     Attribute index - The set of names of variants.
public static  StringDEFAULT_NEGOTIATED_ICON
    
public static  StringNEGOTIATED_ICON_P
     Our Icon property.
protected static  StringSTATE_NEG
    
protected  HttpTokenListvary
    


Method Summary
protected  String[]checkVariants(String variants)
    
public  StringgetIcon()
    
public  booleangetParanoidVariantCheck()
    
public  booleangetPutPolicy()
    
public  String[]getVariantNames()
     Get the variant names.
public  ResourceReference[]getVariantResources()
     Get the variant resources. This is somehow broken, it shouldn't allocate the array of variants on each call.
public  booleanlookup(LookupState ls, LookupResult lr)
     Lookup the target resource.
protected  ResourceReferencenegotiate(Request request)
     Negotiate among the various variants for the Resource. We made our best efforts to be as compliant as possible to the HTTP/1.0 content negotiation algorithm.
Parameters:
  request - the incomming request.
protected  booleannegotiateCharsetQuality(Vector states, Request request)
     Negotiate on charsets.
protected  booleannegotiateContentEncoding(Vector states, Request request)
     Negotiate among content encodings.

BUG: This will work only for single encoded variants.
Parameters:
  states - The current negotiation states.
Parameters:
  request - The request to handle.

protected  booleannegotiateContentType(Vector states, Request request)
     Negotiate among content types.
Parameters:
  states - The current states of negotiation.
Parameters:
  request - The request to handle.
protected  booleannegotiateLanguageQuality(Vector states, Request request)
     Negotiate among language qualities.

BUG: This will only work for variants that have one language tag.
Parameters:
  states - The current states of negotiation.
Parameters:
  request - The request to handle.

protected  ResourceReferencenegotiatePut(Request request)
    
public  ReplyInterfaceperform(RequestInterface req)
     Perform an HTTP request.
protected  voidprintNegotiationState(String header, Vector states)
     Print the current negotiation state.
public  voidregisterResource(FramedResource resource)
    
public  voidsetParanoidVariantCheck(boolean strict)
    
public  voidsetPutPolicy(Boolean strict)
    
public  voidsetPutPolicy(boolean strict)
    
public synchronized  voidsetValue(int idx, Object value)
    
public  voidsetVariants(String variants)
    

Field Detail
ATTR_PARANOID_VARIANT_CHECK
protected static int ATTR_PARANOID_VARIANT_CHECK(Code)
Attribute index - Should the variants to be strictly checked? the variants should NEVER contain negotiated resources!



ATTR_PUT_POLICY
protected static int ATTR_PUT_POLICY(Code)
Attribute index - Should the PUT needs to be strictly checked?



ATTR_VARIANTS
protected static int ATTR_VARIANTS(Code)
Attribute index - The set of names of variants.



DEFAULT_NEGOTIATED_ICON
public static String DEFAULT_NEGOTIATED_ICON(Code)
Our default Icon



NEGOTIATED_ICON_P
public static String NEGOTIATED_ICON_P(Code)
Our Icon property.



STATE_NEG
protected static String STATE_NEG(Code)
our state



vary
protected HttpTokenList vary(Code)
The Vary header field for this resource





Method Detail
checkVariants
protected String[] checkVariants(String variants)(Code)



getIcon
public String getIcon()(Code)



getParanoidVariantCheck
public boolean getParanoidVariantCheck()(Code)
get the variant checking policy



getPutPolicy
public boolean getPutPolicy()(Code)
get the "strictness" of the PUT checking



getVariantNames
public String[] getVariantNames()(Code)
Get the variant names.



getVariantResources
public ResourceReference[] getVariantResources() throws ProtocolException(Code)
Get the variant resources. This is somehow broken, it shouldn't allocate the array of variants on each call. However, don't forget that the list of variants can be dynamically edited, this means that if we are to keep a cache of it (as would be the case if we kept the array of variants as instance var) we should also take care of editing of attributes (possible, but I just don't have enough lifes). An array of ResourceReference, or null.
exception:
  ProtocolException - If one of the variants doesn't exist.



lookup
public boolean lookup(LookupState ls, LookupResult lr) throws ProtocolException(Code)
Lookup the target 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



negotiate
protected ResourceReference negotiate(Request request) throws ProtocolException(Code)
Negotiate among the various variants for the Resource. We made our best efforts to be as compliant as possible to the HTTP/1.0 content negotiation algorithm.
Parameters:
  request - the incomming request. a RefourceReference instance.
exception:
  ProtocolException - If one of the variants doesn't exist.



negotiateCharsetQuality
protected boolean negotiateCharsetQuality(Vector states, Request request)(Code)
Negotiate on charsets. The algorithm is described in RFC2616 (Obsoletes RFC2068)
Parameters:
  states - The current states of negotiation.
Parameters:
  request - The request to handle.



negotiateContentEncoding
protected boolean negotiateContentEncoding(Vector states, Request request) throws ProtocolException(Code)
Negotiate among content encodings.

BUG: This will work only for single encoded variants.
Parameters:
  states - The current negotiation states.
Parameters:
  request - The request to handle. a boolean.
exception:
  ProtocolException - If one of the variants doesn't exist.




negotiateContentType
protected boolean negotiateContentType(Vector states, Request request) throws ProtocolException(Code)
Negotiate among content types.
Parameters:
  states - The current states of negotiation.
Parameters:
  request - The request to handle. a boolean.
exception:
  ProtocolException - If one of the variants doesn't exist.



negotiateLanguageQuality
protected boolean negotiateLanguageQuality(Vector states, Request request) throws ProtocolException(Code)
Negotiate among language qualities.

BUG: This will only work for variants that have one language tag.
Parameters:
  states - The current states of negotiation.
Parameters:
  request - The request to handle. a boolean.
exception:
  ProtocolException - If one of the variants doesn't exist.




negotiatePut
protected ResourceReference negotiatePut(Request request) throws ProtocolException, ResourceException(Code)
"negotiate" for a PUT, the negotiation of a PUT should be different as we just want to match the desciption of the entity and the available variants request, the request to handle a ResourceReference instance
exception:
  ProtocolException - If negotiating among the resource variants failed.
exception:
  ResourceException - If the resource got a fatal error.



perform
public ReplyInterface perform(RequestInterface req) throws ProtocolException, ResourceException(Code)
Perform an HTTP request. Negotiate among the variants, the best variant according to the request fields, and make this elected variant serve the request.
Parameters:
  request - The request to handle.
exception:
  ProtocolException - If negotiating among the resource variants failed.
exception:
  ResourceException - If the resource got a fatal error.



printNegotiationState
protected void printNegotiationState(String header, Vector states)(Code)
Print the current negotiation state.
Parameters:
  header - The header to print first.
Parameters:
  states - The current negotiation states.



registerResource
public void registerResource(FramedResource resource)(Code)



setParanoidVariantCheck
public void setParanoidVariantCheck(boolean strict)(Code)



setPutPolicy
public void setPutPolicy(Boolean strict)(Code)



setPutPolicy
public void setPutPolicy(boolean strict)(Code)



setValue
public synchronized void setValue(int idx, Object value)(Code)



setVariants
public void setVariants(String variants)(Code)



Fields inherited from org.w3c.jigsaw.frames.HTTPFrame
protected static int ATTR_ALLOW_DEL(Code)(Java Doc)
protected static int ATTR_BROWSABLE(Code)(Java Doc)
protected static int ATTR_CHARSET(Code)(Java Doc)
protected static int ATTR_CONTENT_ENCODING(Code)(Java Doc)
protected static int ATTR_CONTENT_LANGUAGE(Code)(Java Doc)
protected static int ATTR_CONTENT_LENGTH(Code)(Java Doc)
protected static int ATTR_CONTENT_TYPE(Code)(Java Doc)
protected static int ATTR_ICON(Code)(Java Doc)
protected static int ATTR_ICONDIR(Code)(Java Doc)
protected static int ATTR_INDEX(Code)(Java Doc)
protected static int ATTR_INDEXES(Code)(Java Doc)
protected static int ATTR_MAXAGE(Code)(Java Doc)
protected static int ATTR_MD5(Code)(Java Doc)
protected static int ATTR_PUTABLE(Code)(Java Doc)
protected static int ATTR_QUALITY(Code)(Java Doc)
protected static int ATTR_RELOCATE(Code)(Java Doc)
protected static int ATTR_STYLE_LINK(Code)(Java Doc)
protected static int ATTR_TITLE(Code)(Java Doc)
final public static int COND_FAILED(Code)(Java Doc)
final public static int COND_OK(Code)(Java Doc)
final public static int COND_WEAK(Code)(Java Doc)
final public static String STATE_CONTENT_LOCATION(Code)(Java Doc)
protected boolean acceptRanges(Code)(Java Doc)
protected HttpTokenList allowed(Code)(Java Doc)
protected static MimeType browsetype(Code)(Java Doc)
HttpTokenList contentencoding(Code)(Java Doc)
HttpTokenList contentlanguage(Code)(Java Doc)
HttpInteger contentlength(Code)(Java Doc)
HttpMimeType contenttype(Code)(Java Doc)
protected DirectoryResource dresource(Code)(Java Doc)
HttpEntityTag etag(Code)(Java Doc)
protected FileResource fresource(Code)(Java Doc)
HttpDate lastmodified(Code)(Java Doc)
protected HtmlGenerator listing(Code)(Java Doc)
protected long listing_stamp(Code)(Java Doc)
HttpString md5Digest(Code)(Java Doc)

Methods inherited from org.w3c.jigsaw.frames.HTTPFrame
public void addStyleSheet(HtmlGenerator g)(Code)(Java Doc)
public void attributeChanged(AttributeChangedEvent evt)(Code)(Java Doc)
public Reply browse(Request request) throws ProtocolException(Code)(Java Doc)
public boolean checkExpect(Request request)(Code)(Java Doc)
public int checkIfMatch(Request request)(Code)(Java Doc)
public int checkIfModifiedSince(Request request)(Code)(Java Doc)
public int checkIfNoneMatch(Request request)(Code)(Java Doc)
public int checkIfUnmodifiedSince(Request request)(Code)(Java Doc)
public boolean checkRequest(RequestInterface request)(Code)(Java Doc)
public int checkValidators(Request request)(Code)(Java Doc)
public boolean computeContainerListing(boolean refresh)(Code)(Java Doc)
public String computeETag()(Code)(Java Doc)
protected File computeTrashDir(File dir)(Code)(Java Doc)
protected File computeTrashFile(File file)(Code)(Java Doc)
public Reply createDefaultReply(Request request, int status)(Code)(Java Doc)
protected Reply createFileReply(Request request) throws ProtocolException, ResourceException(Code)(Java Doc)
public Reply delete(Request request) throws ProtocolException, ResourceException(Code)(Java Doc)
protected Reply deleteDirectoryResource(Request request) throws ProtocolException, ResourceException(Code)(Java Doc)
protected Reply deleteFileResource(Request request) throws ProtocolException, ResourceException(Code)(Java Doc)
protected Reply deleteMe(Request request) throws HTTPException(Code)(Java Doc)
protected Reply deleteOtherResource(Request request) throws ProtocolException, ResourceException(Code)(Java Doc)
public Reply extended(Request request) throws ProtocolException, ResourceException(Code)(Java Doc)
public Reply get(Request request) throws ProtocolException, ResourceException(Code)(Java Doc)
protected HttpTokenList getAllow()(Code)(Java Doc)
public boolean getAllowDeleteFlag()(Code)(Java Doc)
public boolean getBrowsableFlag()(Code)(Java Doc)
protected synchronized MimeType getBrowseType()(Code)(Java Doc)
public String getCharset()(Code)(Java Doc)
public String getContentEncoding()(Code)(Java Doc)
public String getContentLanguage()(Code)(Java Doc)
public int getContentLength()(Code)(Java Doc)
public MimeType getContentType()(Code)(Java Doc)
public Reply getDirectoryListing(Request request) throws ProtocolException, ResourceException(Code)(Java Doc)
public DirectoryResource getDirectoryResource()(Code)(Java Doc)
protected Reply getDirectoryResource(Request request) throws ProtocolException, ResourceException(Code)(Java Doc)
public HttpEntityTag getETag()(Code)(Java Doc)
public FileResource getFileResource()(Code)(Java Doc)
protected Reply getFileResource(Request request) throws ProtocolException, ResourceException(Code)(Java Doc)
public String getHelpURL()(Code)(Java Doc)
public String getHelpURL(String topic)(Code)(Java Doc)
public String getIcon()(Code)(Java Doc)
public String getIconDirectory()(Code)(Java Doc)
public String getIndex()(Code)(Java Doc)
public String[] getIndexes()(Code)(Java Doc)
public boolean getMD5Flag()(Code)(Java Doc)
public long getMaxAge()(Code)(Java Doc)
protected Reply getOtherResource(Request request) throws ProtocolException, ResourceException(Code)(Java Doc)
public boolean getPutableFlag()(Code)(Java Doc)
public double getQuality()(Code)(Java Doc)
public boolean getRelocateFlag()(Code)(Java Doc)
public String getStyleSheetURL()(Code)(Java Doc)
public String getTitle()(Code)(Java Doc)
public URL getURL(Request request)(Code)(Java Doc)
public Reply handleRangeRequest(Request request, HttpRange r) throws ProtocolException(Code)(Java Doc)
public Reply head(Request request) throws ProtocolException, ResourceException(Code)(Java Doc)
protected Reply headDirectoryResource(Request request) throws ProtocolException, ResourceException(Code)(Java Doc)
protected Reply headFileResource(Request request) throws ProtocolException, ResourceException(Code)(Java Doc)
protected Reply headOtherResource(Request request) throws ProtocolException, ResourceException(Code)(Java Doc)
public void initialize(Hashtable defs)(Code)(Java Doc)
public Reply link(Request request) throws ProtocolException, ResourceException(Code)(Java Doc)
public boolean lookup(LookupState ls, LookupResult lr) throws ProtocolException(Code)(Java Doc)
protected boolean lookupDirectory(LookupState ls, LookupResult lr) throws ProtocolException(Code)(Java Doc)
protected boolean lookupFile(LookupState ls, LookupResult lr) throws ProtocolException(Code)(Java Doc)
protected boolean lookupOther(LookupState ls, LookupResult lr) throws ProtocolException(Code)(Java Doc)
protected boolean lookupResource(LookupState ls, LookupResult lr) throws ProtocolException(Code)(Java Doc)
public Reply options(Request request) throws ProtocolException, ResourceException(Code)(Java Doc)
public ReplyInterface perform(RequestInterface req) throws ProtocolException, ResourceException(Code)(Java Doc)
protected ReplyInterface performFrames(RequestInterface request) throws ProtocolException, ResourceException(Code)(Java Doc)
public void pickleValues(Hashtable defs)(Code)(Java Doc)
public Reply post(Request request) throws ProtocolException, ResourceException(Code)(Java Doc)
public Reply put(Request request) throws ProtocolException, ResourceException(Code)(Java Doc)
protected Reply putFileResource(Request request) throws ProtocolException, ResourceException(Code)(Java Doc)
protected Reply putOtherResource(Request request) throws ProtocolException(Code)(Java Doc)
public void registerOtherResource(FramedResource resource)(Code)(Java Doc)
public void registerResource(FramedResource resource)(Code)(Java Doc)
public synchronized void setValue(int idx, Object value)(Code)(Java Doc)
public Reply trace(Request request) throws HTTPException, ClientException(Code)(Java Doc)
public Reply unlink(Request request) throws ProtocolException, ResourceException(Code)(Java Doc)
public double unsafeGetQuality()(Code)(Java Doc)
protected void updateCachedHeaders()(Code)(Java Doc)

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