Java Doc for HttpMessage.java in  » Web-Server » Jigsaw » org » w3c » www » http » 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.www.http 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.w3c.www.http.HttpMessage

All known Subclasses:   org.w3c.www.http.HttpEntityMessage,
HttpMessage
public class HttpMessage implements MimeHeaderHolder,Cloneable,HTTP(Code)
The basic class for all HTTP messages, as define in the HTTP spec. This class is the base class for a number of other classes, including both the ingoing/outgoing requests and replies.


Field Summary
final public static  intEMIT_ALL
    
final public static  intEMIT_BODY
    
final public static  intEMIT_FOOTERS
    
final public static  intEMIT_HEADERS
    
public static  intH_CACHE_CONTROL
    
public static  intH_CMAN_EXT
    
public static  intH_CONNECTION
    
public static  intH_COOKIE
    
public static  intH_COPT_EXT
    
public static  intH_DATE
    
public static  intH_MAN_EXT
    
public static  intH_OPT_EXT
    
public static  intH_PRAGMA
    
public static  intH_PROTOCOL
    
public static  intH_PROTOCOL_INFO
    
public static  intH_PROTOCOL_QUERY
    
public static  intH_PROTOCOL_REQUEST
    
public static  intH_PROXY_CONNECTION
    
public static  intH_SET_COOKIE
    
public static  intH_TRAILER
    
public static  intH_TRANSFER_ENCODING
    
public static  intH_UPGRADE
    
public static  intH_VIA
    
public static  intMAX_HEADERS
    
protected static  HeaderDescriptiondescriptors
    
protected  longemitdate
     The date at which this message was last emitted.
protected static  Hashtablefactory
     The header value factory.
protected  Dictionaryheaders
     The header value repository.
protected  shortmajor
     The major version of this message, according to HTTP specs.
protected  shortminor
     The minoir version of this message, according to HTTP specs.
protected  ArrayDictionarystate
     The state dictionary.
protected  HeaderValuevalues
    

Constructor Summary
public  HttpMessage(MimeParser parser)
    
public  HttpMessage()
    

Method Summary
public  voidaddConnection(String name)
     Add the given header name to the Connection header.
public  voidaddNoCache(String name)
     Add the given header name to the no-cache directive.
public  voidaddPragma(String name)
     Add the given directive to the Pragma header.
public  voidaddProxyConnection(String name)
     Add the given header name to the Proxy-Connection header.
public  voidaddTransferEncoding(String name)
     Add an encoding token to the given reply stream (ie the body).
public  voidaddVia(String via)
     Add a via clause to the via header.
public  booleancheckNoStore()
     Check the no-store directive of the cache control header.
public  booleancheckOnlyIfCached()
     Check the only-if-cached directive.
public  voiddelState(String name)
     State management - Remove a piece of state from this request.
public  voiddump(OutputStream out)
    
public  voidemit(OutputStream out)
     Emit this message to the given output stream. This methods emits the given message to the stream, after invoking the startEmit method.
public  voidemit(OutputStream out, int what)
    
Parameters:
  out - The output stream to emit the message to.
protected  voidemitHeaders(OutputStream out, int what)
     Emit the headers.
protected  voidendEmit(OutputStream out, int what)
     This message has been emited.
public  EnumerationenumerateHeaderDescriptions(boolean all)
     Enumerate all the available headers for that message. This method returns an enumeration of HeaderDescription instances, which you can then use to access most efficiently header values.
Parameters:
  all - If true the enumeration will coverall headers (even the ones that are not defined for that message)otherwise, it will cover only defined headers.
public  EnumerationenumerateHeaderDescriptions()
     Enumerate all the headers defined for that message.
protected synchronized  StringgenerateExtNamespace()
     get a new namespace.
public  StringgetCManExtHeader(String ext, String header)
     get the String value of the given header relative to the given Extension.
public  StringgetCOptExtHeader(String ext, String header)
     get the String value of the given header relative to the given Extension.
public  HttpCacheControlgetCacheControl()
     Header accessor - get the cache control policy.
public  HttpMessagegetClone()
     Get a clone of this HTTP message.
public  String[]getConnection()
     Header accessor - get the connection header value.
public  HttpCookieListgetCookie()
     Get the cookies attached to that message.
public  longgetDate()
     Header accessor - get the date of this message.
public  HttpMessagegetDeeperClone()
     Get a clone of this HTTP message.
public  longgetEmitDate()
     Get the date at which this message was last emitted, if ever it was.
public  StringgetExtHeader(String ext, String header)
     get the String value of the given header relative to the given Extension.
public  HttpExtListgetExtList(String id)
    
public  DictionarygetExtensionHeaders(HttpExt ext)
     Get the headers relative to the given Http Extension declaration.
public  HeaderValuegetHeaderValue(String name, HeaderValue def)
     Get a header value, given its name.
final public  HeaderValuegetHeaderValue(String name)
     Get a header value by name.
Parameters:
  name - The header's name.
final public  HeaderValuegetHeaderValue(int idx)
     Fast access to header value.
public  HeaderValuegetHeaderValue(HeaderDescription d)
     Get a header value, keyed by it's header description. This is usefull when enumerating headers, by the mean of enumerateHeaderDescriptions.
Parameters:
  d - The header description.
public  HttpExtListgetHttpCManExtDecl()
     Get The Mandatory (Hop-by-Hop) Extension declaration list.
public  HttpExtListgetHttpCOptExtDecl()
     Get The Optionnal (Hop-by-Hop) Extension declaration list.
public  HttpExtListgetHttpManExtDecl()
     Get The Mandatory (End-to-End) Extension declaration list.
public  HttpExtListgetHttpOptExtDecl()
     Get The Optionnal (End-to-End) Extension declaration list.
public  shortgetMajorVersion()
     Get the major version number of this message. This method returns the major version that the caller should use to drive message processing.
public  StringgetManExtHeader(String ext, String header)
     get the String value of the given header relative to the given Extension.
public  intgetMaxAge()
     Get the max-age value for the current cache control.
public  shortgetMinorVersion()
     Get the minor version number of this message. This method returns the minor version that the caller should use to drive message processing.
public  String[]getNoCache()
     Get the no-cache directive of the cache control header.
public  StringgetOptExtHeader(String ext, String header)
     get the String value of the given header relative to the given Extension.
public  String[]getPragma()
     Header accessor - get the pragmas applicable to this message.
public  HttpBaggetProtocol()
     Get the set of protocol extensions that have been applied to that that message.
public  HttpBaggetProtocolInfo()
     Get the protocol extensions informations carried by this message.
public  HttpBaggetProtocolQuery()
     Get the set of protocol extensions that are queried through this message.
public  HttpBaggetProtocolRequest()
     Get the set of protocol extensions requested by this message.
public  String[]getProxyConnection()
     Header accessor - get the proxy connection header value.
public  intgetSMaxAge()
     Get the s-maxage value for the current cache control.
public  HttpSetCookieListgetSetCookie()
     Get the value of the SetCookie header.
public  ObjectgetState(String name)
     State management - Lookup the value of a state on this request.
Parameters:
  name - The name of the piece of state to look for.
public  EnumerationgetStateNames()
     Get an enumeration of the states names.
public  String[]getTrailer()
    
public  String[]getTransferEncoding()
     Header accessor - get the transfer encoding applying to this message.
public  String[]getUpgrade()
     Header accessor - get the upgrade header of this message.
public  StringgetValue(String name)
     Get a header field value as a String.
Parameters:
  name - The name of the header.
public  StringgetValue(HeaderDescription d)
     Get a header field value as a String.
Parameters:
  d - The header description.
public  StringgetVersion()
     Get the String identifying the HTTP version used for this message.
public  String[]getVia()
     Header accessor - get the via header of this message.
public  booleanhasConnection(String tok)
    
public  booleanhasHeader(String name)
     Probe this message for a defined header.
Parameters:
  name - The name of the header to check.
public  booleanhasHeader(int idx)
     Probe this message for a defined header, fast access !
Parameters:
  idx - The index of the well-known header to check.
public  booleanhasPragma(String pragma)
     Header accessor - Check for a given pragma.
Parameters:
  pragma - The pragma to check for.
public  booleanhasProxyConnection(String tok)
     Does the proxy connection header defines the given token.
Parameters:
  tok - The token to check for.
public  booleanhasState(String name)
    
public  booleanhasTransferEncoding(String encoding)
     Header accessor - Check for a given transfer encoding.
Parameters:
  encoding - The pragma to check for.
public  booleannotifyBeginParsing(MimeParser parser)
     MimeHeaderHolder implementation - HTTP message about to be parsed. No further action is required at this point (we do not distinguish between request or reply here).
public  voidnotifyEndParsing(MimeParser parser)
     MimeHeaderHolder implementation - HTTP message parsing done.
public  voidnotifyHeader(String name, byte buf, int off, int len)
     MimeHeaderHolder implementation - The MIME parser callback. This method is called if the HttpMessage is created by parsing an input stream.
final public static  voidregisterExtHeader(String name, String cls)
    
final protected static  voidregisterHeader(String name, String cls)
    
final protected static  voidregisterHeader(String name, String c, int i)
    
public  voidremoveHeader(String name)
     Remove a header, by name.
final public  voidremoveHeader(int idx)
     Remove a header, by address.
public  voidsetCacheControl(HttpCacheControl control)
     Header accessor - set the cache control associated with the message.
public  voidsetConnection(String tokens)
     Header accessor - set the connection header value.
public  voidsetCookie(HttpCookieList cookie)
     Set the cookies attached to this message.
public  voidsetDate(long date)
     Header accessor - set the date of this message.
public  voidsetEnd2EndExtensionAcknowledgmentHeader()
    
public synchronized  voidsetExtensionHeader(HttpExt ext, String name, String value)
     Set an extension header relative to the given extension declaration.
public  voidsetHeaderValue(String name, HeaderValue value)
     Set a header value.
public  voidsetHeaderValue(HeaderDescription d, HeaderValue v)
     Set a header value, keyed by it's header description.
final public  voidsetHeaderValue(int idx, HeaderValue value)
     Fast write accessor to headers.

This method provides a very fast write access to header values.

public  voidsetHopByHopExtensionAcknowledgmentHeader()
    
public  voidsetHttpCManExtDecl(HttpExtList exts)
     Set The Mandatory (Hop-by-Hop) Extension declaration list.
public  voidsetHttpCOptExtDecl(HttpExtList exts)
     Set The Optional (Hop-by-Hop) Extension declaration list.
public  voidsetHttpExtDecl(HttpExtList exts)
     Set the Extension declaration.
public  voidsetHttpManExtDecl(HttpExtList exts)
     Set The Mandatory (End-to-End) Extension declaration list.
public  voidsetHttpOptExtDecl(HttpExtList exts)
     Set The Optional (End-to-End) Extension declaration list.
public  voidsetMaxAge(int maxage)
     Set the max-age value of the associated cache control. This method hides as much as possible, the difference between HTTP/1.1 max-age, and HTTP/1.0 expires headers.
protected  voidsetNamespaces(HttpExtList extl)
    
public  voidsetNoCache(String nocache)
     Set the no-cache directive of the cache control header.
public  voidsetNoCache()
     Set the no-cache directive globally.
public  voidsetNoStore(boolean onoff)
     Set the no-store directive.
public  voidsetOnlyIfCached(boolean onoff)
     Set the only-if-cached directive.
public  voidsetPragma(String tokens)
     Header accessor - set the pragmas applicable to this message.
public  voidsetProtocol(HttpBag bag)
     Set the protocol extensions applied to that message.
public  voidsetProtocolInfo(HttpBag bag)
     Attach protocol extensions informations to that message.
public  voidsetProtocolQuery(HttpBag bag)
     Set the protocol extensions queried by that message.
public  voidsetProtocolRequest(HttpBag bag)
     Set the protocol extensions required by this message.
public  voidsetProxyConnection(String tokens)
     Header accessor - set the proxy connection header value.
public  voidsetSMaxAge(int smaxage)
     Set the s-maxage value of the associated cache control.
public  voidsetSetCookie(HttpSetCookieList setcookie)
     Set the value of the Set-Cookie header.
public  voidsetState(String name, Object value)
     State management - Add a piece of state to this request.
public  voidsetTrailer(String trailers)
    
public  voidsetTransferEncoding(String tokens)
     Header accessor - set the transfer encoding for this message.
public  voidsetUpgrade(String products)
     Header accessor - set the upgrade header of this message.
public  voidsetValue(String name, String strval)
     Define a new header field.
public  voidsetVia(String vias)
     Header accessor - set the Via header of this message.
protected  voidstartEmit(OutputStream out, int what)
     This message is about to be emited.

Field Detail
EMIT_ALL
final public static int EMIT_ALL(Code)



EMIT_BODY
final public static int EMIT_BODY(Code)



EMIT_FOOTERS
final public static int EMIT_FOOTERS(Code)



EMIT_HEADERS
final public static int EMIT_HEADERS(Code)



H_CACHE_CONTROL
public static int H_CACHE_CONTROL(Code)



H_CMAN_EXT
public static int H_CMAN_EXT(Code)



H_CONNECTION
public static int H_CONNECTION(Code)



H_COOKIE
public static int H_COOKIE(Code)



H_COPT_EXT
public static int H_COPT_EXT(Code)



H_DATE
public static int H_DATE(Code)



H_MAN_EXT
public static int H_MAN_EXT(Code)



H_OPT_EXT
public static int H_OPT_EXT(Code)



H_PRAGMA
public static int H_PRAGMA(Code)



H_PROTOCOL
public static int H_PROTOCOL(Code)



H_PROTOCOL_INFO
public static int H_PROTOCOL_INFO(Code)



H_PROTOCOL_QUERY
public static int H_PROTOCOL_QUERY(Code)



H_PROTOCOL_REQUEST
public static int H_PROTOCOL_REQUEST(Code)



H_PROXY_CONNECTION
public static int H_PROXY_CONNECTION(Code)



H_SET_COOKIE
public static int H_SET_COOKIE(Code)



H_TRAILER
public static int H_TRAILER(Code)



H_TRANSFER_ENCODING
public static int H_TRANSFER_ENCODING(Code)



H_UPGRADE
public static int H_UPGRADE(Code)



H_VIA
public static int H_VIA(Code)



MAX_HEADERS
public static int MAX_HEADERS(Code)



descriptors
protected static HeaderDescription descriptors(Code)



emitdate
protected long emitdate(Code)
The date at which this message was last emitted.



factory
protected static Hashtable factory(Code)
The header value factory.



headers
protected Dictionary headers(Code)
The header value repository. At this time, I am using this quite inefficient scheme, but the API have been carefully designed to enable a more efficient implementation.



major
protected short major(Code)
The major version of this message, according to HTTP specs.



minor
protected short minor(Code)
The minoir version of this message, according to HTTP specs.



state
protected ArrayDictionary state(Code)
The state dictionary.



values
protected HeaderValue values(Code)




Constructor Detail
HttpMessage
public HttpMessage(MimeParser parser)(Code)



HttpMessage
public HttpMessage()(Code)




Method Detail
addConnection
public void addConnection(String name)(Code)
Add the given header name to the Connection header.
Parameters:
  name - The name of the header to add to the Connectionheader.



addNoCache
public void addNoCache(String name)(Code)
Add the given header name to the no-cache directive.
Parameters:
  name - The header name to add there.



addPragma
public void addPragma(String name)(Code)
Add the given directive to the Pragma header.
Parameters:
  name - The name of the directive to add to the Pragmaheader.



addProxyConnection
public void addProxyConnection(String name)(Code)
Add the given header name to the Proxy-Connection header.
Parameters:
  name - The name of the header to add to the Proxy-Connection header.



addTransferEncoding
public void addTransferEncoding(String name)(Code)
Add an encoding token to the given reply stream (ie the body).
Parameters:
  name - The name of the encoding to add.



addVia
public void addVia(String via)(Code)
Add a via clause to the via header.
Parameters:
  via - The new via clause.



checkNoStore
public boolean checkNoStore()(Code)
Check the no-store directive of the cache control header. A boolean true if set, falseotherwise.



checkOnlyIfCached
public boolean checkOnlyIfCached()(Code)
Check the only-if-cached directive. A boolean, true if the directive is set,false otherwise.



delState
public void delState(String name)(Code)
State management - Remove a piece of state from this request.
Parameters:
  name - The name of the piece of state to remove.



dump
public void dump(OutputStream out)(Code)



emit
public void emit(OutputStream out) throws IOException(Code)
Emit this message to the given output stream. This methods emits the given message to the stream, after invoking the startEmit method. Once the whole message has been emited, the endEmit method is called back.
Parameters:
  out - The output stream to emit the message to.
exception:
  IOException - If the message couldn't be emited to thegiven stream, due to IO errors.



emit
public void emit(OutputStream out, int what) throws IOException(Code)

Parameters:
  out - The output stream to emit the message to.
Parameters:
  what - (fixme doc)
exception:
  IOException - If the message couldn't be emited to the given stream, due to IO errors.



emitHeaders
protected void emitHeaders(OutputStream out, int what) throws IOException(Code)
Emit the headers.
exception:
  IOException - if an IO error occurs.



endEmit
protected void endEmit(OutputStream out, int what) throws IOException(Code)
This message has been emited. Take any appropriate action.
exception:
  IOException - if an IO error occurs.



enumerateHeaderDescriptions
public Enumeration enumerateHeaderDescriptions(boolean all)(Code)
Enumerate all the available headers for that message. This method returns an enumeration of HeaderDescription instances, which you can then use to access most efficiently header values.
Parameters:
  all - If true the enumeration will coverall headers (even the ones that are not defined for that message)otherwise, it will cover only defined headers. An enumeration.



enumerateHeaderDescriptions
public Enumeration enumerateHeaderDescriptions()(Code)
Enumerate all the headers defined for that message. This method returns an enumeration of HeaderDescription instances, which you can then use to access most efficiently header values. An enumeration.



generateExtNamespace
protected synchronized String generateExtNamespace()(Code)
get a new namespace. an int.



getCManExtHeader
public String getCManExtHeader(String ext, String header)(Code)
get the String value of the given header relative to the given Extension. This method search the header in the following declarations:
  • Mandatory (Hop-by-Hop) Extensions

Parameters:
  ext - the extension
Parameters:
  header - the extension header a String (or null)



getCOptExtHeader
public String getCOptExtHeader(String ext, String header)(Code)
get the String value of the given header relative to the given Extension. This method search the header in the following declarations:
  • Optionnal (hop-by-Hop) Extensions

Parameters:
  ext - the extension
Parameters:
  header - the extension header a String (or null)



getCacheControl
public HttpCacheControl getCacheControl()(Code)
Header accessor - get the cache control policy. The current cache control policy, or nullif undefined.



getClone
public HttpMessage getClone()(Code)
Get a clone of this HTTP message. An HttpMessage, of the class of the message receiver.



getConnection
public String[] getConnection()(Code)
Header accessor - get the connection header value. The tokens of the connection header, as a String array, ornull if undefined.



getCookie
public HttpCookieList getCookie()(Code)
Get the cookies attached to that message. An instance of HttpCookie holding the list of available cookies, or null if undefined.



getDate
public long getDate()(Code)
Header accessor - get the date of this message. A long giving the date of this message, following the Java runtime convention (milliseconds since epoch), or -1if undefined.



getDeeperClone
public HttpMessage getDeeperClone()(Code)
Get a clone of this HTTP message. It is a semi-deep clone, not a complete one. An HttpMessage, of the class of the message receiver.



getEmitDate
public long getEmitDate()(Code)
Get the date at which this message was last emitted, if ever it was. The date, in milliseconds since Java epoch at which this messagewas emitted, or -1 if the message was never emitted.



getExtHeader
public String getExtHeader(String ext, String header)(Code)
get the String value of the given header relative to the given Extension. This method search the header in the following declarations:
  • Mandatory (End-to-End) Extensions
  • Mandatory (Hop-by-Hop) Extensions
  • Optionnal (End-to-End) Extensions
  • Optionnal (hop-by-Hop) Extensions

Parameters:
  ext - the extension
Parameters:
  header - the extension header a String (or null)



getExtList
public HttpExtList getExtList(String id)(Code)
Get an Http Extension Listfrom the following list:
  • Mandatory (End-to-End) Extensions
  • Mandatory (Hop-by-Hop) Extensions
  • Optionnal (End-to-End) Extensions
  • Optionnal (hop-by-Hop) Extensions

Parameters:
  ext - the Extension id a HttpExtList containing the extension declaration (or null)



getExtensionHeaders
public Dictionary getExtensionHeaders(HttpExt ext)(Code)
Get the headers relative to the given Http Extension declaration.
Parameters:
  ext - the HttpExt a Dictionnary of



getHeaderValue
public HeaderValue getHeaderValue(String name, HeaderValue def)(Code)
Get a header value, given its name.
Parameters:
  name - The name of the field whose value is to be fetched.
Parameters:
  def - The default value if the field is undefined.



getHeaderValue
final public HeaderValue getHeaderValue(String name)(Code)
Get a header value by name.
Parameters:
  name - The header's name. The value of the header, as a String, or nullif undefined.



getHeaderValue
final public HeaderValue getHeaderValue(int idx)(Code)
Fast access to header value.

This method provides a very fast access to pre-defined header values. You can use it on all headers that have an access token.
Parameters:
  idx - The token of the header to access. An instance of HeaderValue or null if undefined.




getHeaderValue
public HeaderValue getHeaderValue(HeaderDescription d)(Code)
Get a header value, keyed by it's header description. This is usefull when enumerating headers, by the mean of enumerateHeaderDescriptions.
Parameters:
  d - The header description. A HeaderValue instance, if the header is defined,null otherwise.



getHttpCManExtDecl
public HttpExtList getHttpCManExtDecl()(Code)
Get The Mandatory (Hop-by-Hop) Extension declaration list. a HttpExtList instance or null;



getHttpCOptExtDecl
public HttpExtList getHttpCOptExtDecl()(Code)
Get The Optionnal (Hop-by-Hop) Extension declaration list. a HttpExtList instance or null;



getHttpManExtDecl
public HttpExtList getHttpManExtDecl()(Code)
Get The Mandatory (End-to-End) Extension declaration list. a HttpExtList instance or null;



getHttpOptExtDecl
public HttpExtList getHttpOptExtDecl()(Code)
Get The Optionnal (End-to-End) Extension declaration list. a HttpExtList instance or null;



getMajorVersion
public short getMajorVersion()(Code)
Get the major version number of this message. This method returns the major version that the caller should use to drive message processing. It may not match the version number actually emitted on the wire, which is computed by the API itself. A ninteger giving the major version number.



getManExtHeader
public String getManExtHeader(String ext, String header)(Code)
get the String value of the given header relative to the given Extension. This method search the header in the following declarations:
  • Mandatory (End-to-End) Extensions

Parameters:
  ext - the extension
Parameters:
  header - the extension header a String (or null)



getMaxAge
public int getMaxAge()(Code)
Get the max-age value for the current cache control. The max age value, as an integer, or -1 ifundefined.



getMinorVersion
public short getMinorVersion()(Code)
Get the minor version number of this message. This method returns the minor version that the caller should use to drive message processing. It may not match the minor version number emitted on the wire, which is computed by the API itself. An integer giving the minor version number.



getNoCache
public String[] getNoCache()(Code)
Get the no-cache directive of the cache control header. A list of token (potentially empty) encoded as an array ofString (with 0 length if empty), or null ifundefined.



getOptExtHeader
public String getOptExtHeader(String ext, String header)(Code)
get the String value of the given header relative to the given Extension. This method search the header in the following declarations:
  • Optionnal (End-to-End) Extensions

Parameters:
  ext - the extension
Parameters:
  header - the extension header a String (or null)



getPragma
public String[] getPragma()(Code)
Header accessor - get the pragmas applicable to this message. The pragma tokens applicable to this message, encodedas a String array, or null if undefined.



getProtocol
public HttpBag getProtocol()(Code)
Get the set of protocol extensions that have been applied to that that message. A bag containing the description of the protocol extensionsapplied to that message, or null.



getProtocolInfo
public HttpBag getProtocolInfo()(Code)
Get the protocol extensions informations carried by this message. A bag containing the description of the protocol extensionsinformations carried by that message, or null.



getProtocolQuery
public HttpBag getProtocolQuery()(Code)
Get the set of protocol extensions that are queried through this message. A bag containing the description of the protocol extensionsqueried by that message, or null.



getProtocolRequest
public HttpBag getProtocolRequest()(Code)
Get the set of protocol extensions requested by this message. A bag containing the description of the protocol extensionsrequested by this message, or null.



getProxyConnection
public String[] getProxyConnection()(Code)
Header accessor - get the proxy connection header value. The tokens of the connection header, as a String array,or null if undefined.



getSMaxAge
public int getSMaxAge()(Code)
Get the s-maxage value for the current cache control. The s-maxage value, as an integer (seconds), or -1 if undefined.



getSetCookie
public HttpSetCookieList getSetCookie()(Code)
Get the value of the SetCookie header. AN HttpSetCookie instance, or null if undefined.



getState
public Object getState(String name)(Code)
State management - Lookup the value of a state on this request.
Parameters:
  name - The name of the piece of state to look for. An object, if the piece of state is defined, null otherwise.



getStateNames
public Enumeration getStateNames()(Code)
Get an enumeration of the states names. an Enumeration



getTrailer
public String[] getTrailer()(Code)
Get this message trailer A list of encoding tokens, encoded as a String array, or null if undefined.



getTransferEncoding
public String[] getTransferEncoding()(Code)
Header accessor - get the transfer encoding applying to this message. The list of encoding tokens, as a String array, or null if undefined.



getUpgrade
public String[] getUpgrade()(Code)
Header accessor - get the upgrade header of this message. A list of products, encoded as an array of Stringor null if undefined.



getValue
public String getValue(String name)(Code)
Get a header field value as a String.
Parameters:
  name - The name of the header. A String giving the header value, or nullif undefined.



getValue
public String getValue(HeaderDescription d)(Code)
Get a header field value as a String.
Parameters:
  d - The header description. The String value for the given header, or nullif undefined.



getVersion
public String getVersion()(Code)
Get the String identifying the HTTP version used for this message. A String identifying the protocol version.



getVia
public String[] getVia()(Code)
Header accessor - get the via header of this message. A Via array describing each hop of the message, or null if undefined.



hasConnection
public boolean hasConnection(String tok)(Code)
Does the connection header include the given token ? A boolean.



hasHeader
public boolean hasHeader(String name)(Code)
Probe this message for a defined header.
Parameters:
  name - The name of the header to check. true if the header is defined, false otherwise.



hasHeader
public boolean hasHeader(int idx)(Code)
Probe this message for a defined header, fast access !
Parameters:
  idx - The index of the well-known header to check. true if the header is defined, false otherwise.



hasPragma
public boolean hasPragma(String pragma)(Code)
Header accessor - Check for a given pragma.
Parameters:
  pragma - The pragma to check for. A boolean true if this pragma is set, false otherwise.



hasProxyConnection
public boolean hasProxyConnection(String tok)(Code)
Does the proxy connection header defines the given token.
Parameters:
  tok - The token to check for. A boolean.



hasState
public boolean hasState(String name)(Code)
State management - Is the given state defined for the message ? A boolean true if the state is defined, false otherwise.



hasTransferEncoding
public boolean hasTransferEncoding(String encoding)(Code)
Header accessor - Check for a given transfer encoding.
Parameters:
  encoding - The pragma to check for. A boolean true if this encoding is set, false otherwise.



notifyBeginParsing
public boolean notifyBeginParsing(MimeParser parser) throws HttpParserException, IOException(Code)
MimeHeaderHolder implementation - HTTP message about to be parsed. No further action is required at this point (we do not distinguish between request or reply here). The MIME parsing is to continue normally so we return false. Always false to conotinue the MIME parsing.
exception:
  HttpParserException - if parsing failed.
exception:
  IOException - if an IO error occurs.



notifyEndParsing
public void notifyEndParsing(MimeParser parser) throws HttpParserException, IOException(Code)
MimeHeaderHolder implementation - HTTP message parsing done. Nothing special to be done here, return straight.
exception:
  HttpParserException - if parsing failed.
exception:
  IOException - if an IO error occurs.



notifyHeader
public void notifyHeader(String name, byte buf, int off, int len)(Code)
MimeHeaderHolder implementation - The MIME parser callback. This method is called if the HttpMessage is created by parsing an input stream. Each time the MIME parser detects a new header field, it calls back this method.
Parameters:
  name - The name of the header that has been encountered.
Parameters:
  buf - The buffer containing the header value.
Parameters:
  off - The offset of the header value in the above buffer.
Parameters:
  len - The length of the header value in the above buffer.



registerExtHeader
final public static void registerExtHeader(String name, String cls)(Code)



registerHeader
final protected static void registerHeader(String name, String cls)(Code)



registerHeader
final protected static void registerHeader(String name, String c, int i)(Code)



removeHeader
public void removeHeader(String name)(Code)
Remove a header, by name.
Parameters:
  name - The name of the header to remove.



removeHeader
final public void removeHeader(int idx)(Code)
Remove a header, by address. A fast version of the above.
Parameters:
  idx - The index of the header to remove.



setCacheControl
public void setCacheControl(HttpCacheControl control)(Code)
Header accessor - set the cache control associated with the message. This method should not be used in general, it's much more preferable to use the various cache control accessors available.
Parameters:
  control - The cache control policy, or nullto reset the value.



setConnection
public void setConnection(String tokens)(Code)
Header accessor - set the connection header value.
Parameters:
  tokens - The connection tokens as a String array, or null to reset the value.



setCookie
public void setCookie(HttpCookieList cookie)(Code)
Set the cookies attached to this message.
Parameters:
  cookies - The HttpCookie instance describing the cookies, ornull to reset value.



setDate
public void setDate(long date)(Code)
Header accessor - set the date of this message.
Parameters:
  date - The date of the message, following Java runtime conventions(number of milliseconds since epoch), or -1 toreset the value.



setEnd2EndExtensionAcknowledgmentHeader
public void setEnd2EndExtensionAcknowledgmentHeader()(Code)



setExtensionHeader
public synchronized void setExtensionHeader(HttpExt ext, String name, String value)(Code)
Set an extension header relative to the given extension declaration.
Parameters:
  ext - The extension declaration
Parameters:
  name - the header name
Parameters:
  value - the header value



setHeaderValue
public void setHeaderValue(String name, HeaderValue value)(Code)
Set a header value.
Parameters:
  name - The name of the header to define.
Parameters:
  value - It's HeaderValue.



setHeaderValue
public void setHeaderValue(HeaderDescription d, HeaderValue v)(Code)
Set a header value, keyed by it's header description.
Parameters:
  d - The header description.
Parameters:
  v - The HeaderValue instance, or null toreset the header value.



setHeaderValue
final public void setHeaderValue(int idx, HeaderValue value)(Code)
Fast write accessor to headers.

This method provides a very fast write access to header values. It can be used with any of the headers that have a pre-defined access token.
Parameters:
  idx - The access token of the header's to write to.
Parameters:
  value - The new header value.




setHopByHopExtensionAcknowledgmentHeader
public void setHopByHopExtensionAcknowledgmentHeader()(Code)



setHttpCManExtDecl
public void setHttpCManExtDecl(HttpExtList exts)(Code)
Set The Mandatory (Hop-by-Hop) Extension declaration list.
Parameters:
  exts - the extension declaration list.



setHttpCOptExtDecl
public void setHttpCOptExtDecl(HttpExtList exts)(Code)
Set The Optional (Hop-by-Hop) Extension declaration list.
Parameters:
  exts - the extension declaration list.



setHttpExtDecl
public void setHttpExtDecl(HttpExtList exts)(Code)
Set the Extension declaration. WARNING: The ManOpt flag of exts must have been set.
Parameters:
  exts - the extension declaration list.



setHttpManExtDecl
public void setHttpManExtDecl(HttpExtList exts)(Code)
Set The Mandatory (End-to-End) Extension declaration list.
Parameters:
  exts - the extension declaration list.



setHttpOptExtDecl
public void setHttpOptExtDecl(HttpExtList exts)(Code)
Set The Optional (End-to-End) Extension declaration list.
Parameters:
  exts - the extension declaration list.



setMaxAge
public void setMaxAge(int maxage)(Code)
Set the max-age value of the associated cache control. This method hides as much as possible, the difference between HTTP/1.1 max-age, and HTTP/1.0 expires headers. It will set only the appropriate one.
Parameters:
  maxage - The max-age value, or -1 to reset the value.



setNamespaces
protected void setNamespaces(HttpExtList extl)(Code)



setNoCache
public void setNoCache(String nocache)(Code)
Set the no-cache directive of the cache control header.
Parameters:
  nocache - A list of headers name encoded as an array of String(of length possibly 0), or nullto reset the value.



setNoCache
public void setNoCache()(Code)
Set the no-cache directive globally.



setNoStore
public void setNoStore(boolean onoff)(Code)
Set the no-store directive.
Parameters:
  onoff - Turn it on or off.



setOnlyIfCached
public void setOnlyIfCached(boolean onoff)(Code)
Set the only-if-cached directive.
Parameters:
  onoff - Turn it on or off.



setPragma
public void setPragma(String tokens)(Code)
Header accessor - set the pragmas applicable to this message.
Parameters:
  tokens - The pragma tokens as a String array, or null to reset the value.



setProtocol
public void setProtocol(HttpBag bag)(Code)
Set the protocol extensions applied to that message.
Parameters:
  protocols - A bag instance, describing the protocol extensionsapplied to the message, or null to reset previousvalue.



setProtocolInfo
public void setProtocolInfo(HttpBag bag)(Code)
Attach protocol extensions informations to that message.
Parameters:
  protocols - A bag instance, describing the protocol extensionsinformations to attach to the message, or null to reset previous value.



setProtocolQuery
public void setProtocolQuery(HttpBag bag)(Code)
Set the protocol extensions queried by that message.
Parameters:
  protocols - A bag instance, describing the protocol extensionsqueried by the message, or null to reset previousvalue.



setProtocolRequest
public void setProtocolRequest(HttpBag bag)(Code)
Set the protocol extensions required by this message.
Parameters:
  protocols - A bag instance, describing the protocol extensionsrequired by the message, or null to reset previousvalue.



setProxyConnection
public void setProxyConnection(String tokens)(Code)
Header accessor - set the proxy connection header value.
Parameters:
  tokens - The connection tokens as a String array, ornull to reset the value.



setSMaxAge
public void setSMaxAge(int smaxage)(Code)
Set the s-maxage value of the associated cache control. Set the s-maxage value on an HTTP/1.1 reply
Parameters:
  maxage - The max-age value in seconds, or -1to reset the value.



setSetCookie
public void setSetCookie(HttpSetCookieList setcookie)(Code)
Set the value of the Set-Cookie header.
Parameters:
  setcookies - The HttpSetCookie value.



setState
public void setState(String name, Object value)(Code)
State management - Add a piece of state to this request. If the piece of state already exists, it is overriden by the new value.
Parameters:
  name - The name of the piece of state to define.
Parameters:
  value - It's corresponding value, or null toreset the value.



setTrailer
public void setTrailer(String trailers)(Code)
Set this message trailer
Parameters:
  encodings - A list of encoding tokens, encoded as a String arrayor null to reset the value.



setTransferEncoding
public void setTransferEncoding(String tokens)(Code)
Header accessor - set the transfer encoding for this message. This just sets the transfer encoding, it is up to the rest of the application to make sure that the encoding is actually applied at emiting time.
Parameters:
  tokens - The transfer encoding tokens as a String array, ornull to reset the value.



setUpgrade
public void setUpgrade(String products)(Code)
Header accessor - set the upgrade header of this message.
Parameters:
  products - An array of products you want this message to carryor null to reset the value.



setValue
public void setValue(String name, String strval)(Code)
Define a new header field.
Parameters:
  name - The name of the header to be defined or reset.
Parameters:
  value - It's String value, or null to resetthe value.



setVia
public void setVia(String vias)(Code)
Header accessor - set the Via header of this message.
Parameters:
  vias - The hops to be placed in the Via header, ornull to reset the value.



startEmit
protected void startEmit(OutputStream out, int what) throws IOException(Code)
This message is about to be emited. Take any appropriate actions.
exception:
  IOException - if an IO error occurs.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(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.