| 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 |
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) | | |
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. |
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. |
getRequestMethod | abstract public String getRequestMethod()(Code) | | HTTP request method, such as "GET" or "POST".
|
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.
|
|
|