com.sun.xml.ws.transport.http
Class HttpAdapter

java.lang.Object
  extended by com.sun.xml.ws.api.server.Adapter<HttpAdapter.HttpToolkit>
      extended by com.sun.xml.ws.transport.http.HttpAdapter
Direct Known Subclasses:
ServletAdapter

public class HttpAdapter
extends Adapter<HttpAdapter.HttpToolkit>

Adapter that receives messages in HTTP.

This object also assigns unique query string (such as "xsd=1") to each SDDocument so that they can be served by HTTP GET requests.


Nested Class Summary
(package private)  class HttpAdapter.AsyncTransport
           
(package private)  class HttpAdapter.HttpToolkit
           
(package private)  class HttpAdapter.Oneway
           
 
Nested classes/interfaces inherited from class com.sun.xml.ws.api.server.Adapter
Adapter.Toolkit
 
Field Summary
static boolean dump
          Dumps what goes across HTTP transport.
 HttpAdapterList<? extends HttpAdapter> owner
           
static boolean publishStatusPage
           
 Map<SDDocument,String> revWsdls
          Reverse map of wsdls.
 String urlPattern
          Servlet URL pattern with which this HttpAdapter is associated.
 Map<String,SDDocument> wsdls
          SDDocuments keyed by the query string like "?abc".
 
Fields inherited from class com.sun.xml.ws.api.server.Adapter
endpoint, pool
 
Constructor Summary
protected HttpAdapter(WSEndpoint endpoint, HttpAdapterList<? extends HttpAdapter> owner)
          Deprecated. remove as soon as we can update the test util.
protected HttpAdapter(WSEndpoint endpoint, HttpAdapterList<? extends HttpAdapter> owner, String urlPattern)
           
 
Method Summary
static HttpAdapter createAlone(WSEndpoint endpoint)
          Creates a lone HttpAdapter that does not know of any other HttpAdapters.
protected  HttpAdapter.HttpToolkit createToolkit()
          Creates a Adapter.Toolkit instance.
 String getValidPath()
          Returns the "/abc/def/ghi" portion if the URL pattern is "/abc/def/ghi/*".
 void handle(WSHTTPConnection connection)
          Receives the incoming HTTP connection and dispatches it to JAX-WS.
 void invokeAsync(WSHTTPConnection con)
           
 void publishWSDL(WSHTTPConnection con)
          Sends out the WSDL (and other referenced documents) in response to the GET requests to URLs like "?wsdl" or "?xsd=2".
 
Methods inherited from class com.sun.xml.ws.api.server.Adapter
getEndpoint
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

wsdls

public final Map<String,SDDocument> wsdls
SDDocuments keyed by the query string like "?abc". Used for serving documents via HTTP GET. Empty if the endpoint doesn't have ServiceDefinition. Read-only.


revWsdls

public final Map<SDDocument,String> revWsdls
Reverse map of wsdls. Read-only.


owner

public final HttpAdapterList<? extends HttpAdapter> owner

urlPattern

public final String urlPattern
Servlet URL pattern with which this HttpAdapter is associated.


dump

public static boolean dump
Dumps what goes across HTTP transport.


publishStatusPage

public static boolean publishStatusPage
Constructor Detail

HttpAdapter

protected HttpAdapter(WSEndpoint endpoint,
                      HttpAdapterList<? extends HttpAdapter> owner)
Deprecated. remove as soon as we can update the test util.


HttpAdapter

protected HttpAdapter(WSEndpoint endpoint,
                      HttpAdapterList<? extends HttpAdapter> owner,
                      String urlPattern)
Method Detail

createAlone

public static HttpAdapter createAlone(WSEndpoint endpoint)
Creates a lone HttpAdapter that does not know of any other HttpAdapters. This is convenient for creating an HttpAdapter for an environment where they don't know each other (such as JavaSE deployment.)

Parameters:
endpoint - web service endpoint
Returns:
singe adapter to process HTTP messages

getValidPath

public String getValidPath()
Returns the "/abc/def/ghi" portion if the URL pattern is "/abc/def/ghi/*".


createToolkit

protected HttpAdapter.HttpToolkit createToolkit()
Description copied from class: Adapter
Creates a Adapter.Toolkit instance.

If the derived class doesn't have to add any per-thread state to Adapter.Toolkit, simply implement this as new Toolkit().

Specified by:
createToolkit in class Adapter<HttpAdapter.HttpToolkit>

handle

public void handle(@NotNull
                   WSHTTPConnection connection)
            throws IOException
Receives the incoming HTTP connection and dispatches it to JAX-WS. This method returns when JAX-WS completes processing the request and the whole reply is written to WSHTTPConnection.

This method is invoked by the lower-level HTTP stack, and "connection" here is an HTTP connection.

To populate a request Packet with more info, define properties on WSHTTPConnection.

Parameters:
connection - to receive/send HTTP messages for web service endpoints
Throws:
IOException - when I/O errors happen

invokeAsync

public void invokeAsync(WSHTTPConnection con)
                 throws IOException
Throws:
IOException

publishWSDL

public void publishWSDL(@NotNull
                        WSHTTPConnection con)
                 throws IOException
Sends out the WSDL (and other referenced documents) in response to the GET requests to URLs like "?wsdl" or "?xsd=2".

Parameters:
con - The connection to which the data will be sent.
Throws:
IOException - when I/O errors happen