Java Doc for WSHTTPConnection.java in  » 6.0-JDK-Modules » jax-ws-runtime » com » sun » xml » ws » transport » 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 » 6.0 JDK Modules » jax ws runtime » com.sun.xml.ws.transport.http 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.xml.ws.api.PropertySet
      com.sun.xml.ws.transport.http.WSHTTPConnection

All known Subclasses:   com.sun.xml.ws.transport.http.servlet.ServletConnectionImpl,  com.sun.xml.ws.transport.http.server.ServerConnectionImpl,  com.sun.xml.ws.transport.local.LocalConnectionImpl,
WSHTTPConnection
abstract public class WSHTTPConnection extends PropertySet (Code)
The view of an HTTP exchange from the point of view of JAX-WS.

Different HTTP server layer uses different implementations of this class so that JAX-WS can be shielded from individuality of such layers. This is an interface implemented as an abstract class, so that future versions of the JAX-WS RI can add new methods.

This class extends PropertySet so that a transport can expose its properties to the appliation and pipes. (This object will be added to Packet.addSatellite(PropertySet) .)
author:
   Jitendra Kotamraju



Field Summary
final public static  intINTERNAL_ERR
    
final public static  intMALFORMED_XML
    
final public static  intOK
    
final public static  intONEWAY
    
final public static  intUNSUPPORTED_MEDIA
    


Method Summary
public  voidclose()
    
public  StringgetBaseAddress()
     Gets the absolute URL up to the context path.
abstract public  InputStreamgetInput()
     Transport's underlying input stream.

This method will be invoked at most once by the JAX-WS RI to read the request body.

abstract public  OutputStreamgetOutput()
     Transport's underlying output stream

This method will be invoked exactly once by the JAX-WS RI to start writing the response body (unless the processing aborts abnormally.) Even if there's no response body to write, this method will still be invoked only to be closed immediately.

abstract public  StringgetPathInfo()
     Requested path.
public  StringgetProtocol()
    
abstract public  StringgetQueryString()
     HTTP Query string, such as "foo=bar", or null if none exists.
abstract public  StringgetRequestHeader(String headerName)
     Gets an HTTP request header.
abstract public  Map<String, List<String>>getRequestHeaders()
     HTTP request headers.
abstract public  StringgetRequestMethod()
     HTTP request method, such as "GET" or "POST".
abstract public  Map<String, List<String>>getResponseHeaders()
    
abstract public  intgetStatus()
     Gets the last value set by WSHTTPConnection.setStatus(int) .
abstract public  WebServiceContextDelegategetWebServiceContextDelegate()
     Returns the WebServiceContextDelegate for this connection.
public  booleanisClosed()
     Retuns whether connection is closed or not.
abstract public  booleanisSecure()
    
public  voidsetContentLengthResponseHeader(int value)
    
abstract public  voidsetContentTypeResponseHeader(String value)
     Sets the "Content-Type" header.

If the Content-Type header has already been set, this method will overwrite the previously set value.

abstract public  voidsetResponseHeaders(Map<String, List<String>> headers)
     Overwrites all the HTTP response headers written thus far.

The implementation should copy the contents of the Map , rather than retaining a reference.

abstract public  voidsetStatus(int status)
     Sets the HTTP response code like WSHTTPConnection.OK .

Field Detail
INTERNAL_ERR
final public static int INTERNAL_ERR(Code)



MALFORMED_XML
final public static int MALFORMED_XML(Code)



OK
final public static int OK(Code)



ONEWAY
final public static int ONEWAY(Code)



UNSUPPORTED_MEDIA
final public static int UNSUPPORTED_MEDIA(Code)





Method Detail
close
public void close()(Code)
Close the connection



getBaseAddress
public String getBaseAddress()(Code)
Gets the absolute URL up to the context path. String like "http://myhost/myapp"
since:
   2.1.2



getInput
abstract public InputStream getInput() throws IOException(Code)
Transport's underlying input stream.

This method will be invoked at most once by the JAX-WS RI to read the request body. If there's no request body, this method should return an empty InputStream . the stream from which the request body will be read.




getOutput
abstract public OutputStream getOutput() throws IOException(Code)
Transport's underlying output stream

This method will be invoked exactly once by the JAX-WS RI to start writing the response body (unless the processing aborts abnormally.) Even if there's no response body to write, this method will still be invoked only to be closed immediately.

Once this method is called, the status code and response headers will never change (IOW WSHTTPConnection.setStatus(int) , WSHTTPConnection.setResponseHeaders , and WSHTTPConnection.setContentTypeResponseHeader(String) will never be invoked.




getPathInfo
abstract public String getPathInfo()(Code)
Requested path. A string like "/foo/bar/baz"



getProtocol
public String getProtocol()(Code)
Subclasses are expected to override



getQueryString
abstract public String getQueryString()(Code)
HTTP Query string, such as "foo=bar", or null if none exists.



getRequestHeader
abstract public String getRequestHeader(String headerName)(Code)
Gets an HTTP request header.

if multiple headers are present, this method returns one of them. (The implementation is free to choose which one it returns.) null if no header exists.




getRequestHeaders
abstract public Map<String, List<String>> getRequestHeaders()(Code)
HTTP request headers. WSHTTPConnection.getRequestHeader(String)can be empty but never null.



getRequestMethod
abstract public String getRequestMethod()(Code)
HTTP request method, such as "GET" or "POST".



getResponseHeaders
abstract public Map<String, List<String>> getResponseHeaders()(Code)
HTTP response headers.



getStatus
abstract public int getStatus()(Code)
Gets the last value set by WSHTTPConnection.setStatus(int) . if WSHTTPConnection.setStatus(int) has not been invoked yet,return 0.



getWebServiceContextDelegate
abstract public WebServiceContextDelegate getWebServiceContextDelegate()(Code)
Returns the WebServiceContextDelegate for this connection.



isClosed
public boolean isClosed()(Code)
Retuns whether connection is closed or not.



isSecure
abstract public boolean isSecure()(Code)
Whether connection is HTTPS or not if the received request is on HTTPS, return trueelse false



setContentLengthResponseHeader
public void setContentLengthResponseHeader(int value)(Code)
Subclasses are expected to override



setContentTypeResponseHeader
abstract public void setContentTypeResponseHeader(String value)(Code)
Sets the "Content-Type" header.

If the Content-Type header has already been set, this method will overwrite the previously set value. If not, this method adds it.

Note that this method and #setResponseHeaders(Map>) may be invoked in any arbitrary order.
Parameters:
  value - strings like "application/xml; charset=UTF-8" or"image/jpeg".




setResponseHeaders
abstract public void setResponseHeaders(Map<String, List<String>> headers)(Code)
Overwrites all the HTTP response headers written thus far.

The implementation should copy the contents of the Map , rather than retaining a reference. The Map passed as a parameter may change after this method is invoked.

This method may be called repeatedly, although in normal use case that's rare (so the implementation is encourage to take advantage of this usage pattern to improve performance, if possible.)

Initially, no header is set.

This parameter is usually exposed to WebServiceContext as Packet.OUTBOUND_TRANSPORT_HEADERS , and thus it should ignore Content-Type and Content-Length headers.
Parameters:
  headers - See HttpURLConnection.getHeaderFields for the format.This parameter may not be null, but since the user applicationcode may invoke this method, a graceful error checking withan helpful error message should be provided if it's actually null.
See Also:   WSHTTPConnection.setContentTypeResponseHeader(String)
See Also:   




setStatus
abstract public void setStatus(int status)(Code)
Sets the HTTP response code like WSHTTPConnection.OK .

While JAX-WS processes a WSHTTPConnection , it will at least call this method once to set a valid HTTP response code. Note that this method may be invoked multiple times (from user code), so do not consider the value to be final until WSHTTPConnection.getOutput() is invoked.




Methods inherited from com.sun.xml.ws.api.PropertySet
final public boolean containsKey(Object key)(Code)(Java Doc)
final public Map<String, Object> createMapView()(Code)(Java Doc)
public Object get(Object key)(Code)(Java Doc)
abstract protected PropertyMap getPropertyMap()(Code)(Java Doc)
protected static PropertyMap parse(Class clazz)(Code)(Java Doc)
public Object put(String key, Object value)(Code)(Java Doc)
public Object remove(Object key)(Code)(Java Doc)
public boolean supports(Object key)(Code)(Java Doc)

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.