Class ServletAdapter
- java.lang.Object
-
- com.sun.xml.ws.api.server.Adapter<com.sun.xml.ws.transport.http.HttpAdapter.HttpToolkit>
-
- com.sun.xml.ws.transport.http.HttpAdapter
-
- com.sun.xml.ws.transport.http.servlet.ServletAdapter
-
- All Implemented Interfaces:
Component,Reconfigurable,BoundEndpoint
public class ServletAdapter extends HttpAdapter implements BoundEndpoint
HttpAdapterfor servlets.This is a thin wrapper around
HttpAdapterwith some description specified in the deployment (in particular those information are related to how a request is routed to aServletAdapter.This class implements
BoundEndpointand represent the servlet-WSEndpointassociation for
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.sun.xml.ws.transport.http.HttpAdapter
HttpAdapter.CompletionCallback
-
Nested classes/interfaces inherited from class com.sun.xml.ws.api.server.Adapter
Adapter.Toolkit
-
-
Field Summary
-
Fields inherited from class com.sun.xml.ws.transport.http.HttpAdapter
disableJreplicaCookie, dump, dump_threshold, NO_OP_COMPLETION_CALLBACK, owner, publishStatusPage, stickyCookie, urlPattern, wsdls
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedServletAdapter(String name, String urlPattern, WSEndpoint endpoint, ServletAdapterList owner)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected WSHTTPConnectioncreateConnection(jakarta.servlet.ServletContext context, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)URIgetAddress()The address of the bound endpoint.URIgetAddress(String baseAddress)The address of the bound endpoint using the base address.StringgetName()Gets the name of the endpoint as given in thesun-jaxws.xmldeployment descriptor.QNamegetPortName()Convenient method to return a port name fromWSEndpoint.jakarta.servlet.ServletContextgetServletContext()voidhandle(jakarta.servlet.ServletContext context, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)Version ofHttpAdapter.handle(WSHTTPConnection)that takes convenient parameters for servlet.voidinvokeAsync(jakarta.servlet.ServletContext context, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, HttpAdapter.CompletionCallback callback)Version ofHttpAdapter.handle(WSHTTPConnection)that takes convenient parameters for servlet.voidpublishWSDL(jakarta.servlet.ServletContext context, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)Deprecated.StringtoString()-
Methods inherited from class com.sun.xml.ws.transport.http.HttpAdapter
addSatellites, createAlone, createToolkit, fixQuotesAroundSoapAction, getDocumentAddressResolver, getNonAnonymousResponseProcessor, getPortAddressResolver, getServiceDefinition, getValidPath, handle, handleGet, initWSDLMap, invokeAsync, invokeAsync, publishWSDL, setDump, setPublishStatus, writeClientError
-
Methods inherited from class com.sun.xml.ws.api.server.Adapter
getEndpoint, getEndpointComponent, getPool, getSPI, reconfigure
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.sun.xml.ws.api.server.BoundEndpoint
getEndpoint
-
-
-
-
Constructor Detail
-
ServletAdapter
protected ServletAdapter(String name, String urlPattern, WSEndpoint endpoint, ServletAdapterList owner)
-
-
Method Detail
-
getServletContext
public jakarta.servlet.ServletContext getServletContext()
-
getName
public String getName()
Gets the name of the endpoint as given in thesun-jaxws.xmldeployment descriptor.
-
getAddress
@NotNull public URI getAddress()
Description copied from interface:BoundEndpointThe address of the bound endpoint.For example, if this endpoint is bound to a servlet endpoint "http://foobar/myapp/myservice", then this method should return that address.
- Specified by:
getAddressin interfaceBoundEndpoint- Returns:
- address of the endpoint
-
getAddress
@NotNull public URI getAddress(String baseAddress)
Description copied from interface:BoundEndpointThe address of the bound endpoint using the base address. Often times, baseAddress is only avaialble during the request.If the endpoint is bound to a servlet endpoint, the base address won't include the url-pattern, so the base address would be "http://host:port/context". This method would include url-pattern for the endpoint and return that address for e.g. "http://host:port/context/url-pattern"
- Specified by:
getAddressin interfaceBoundEndpoint- Parameters:
baseAddress- that is used in computing the full address- Returns:
- address of the endpoint
-
getPortName
public QName getPortName()
Convenient method to return a port name fromWSEndpoint.- Returns:
- null if
WSEndpointisn't tied to any paritcular port.
-
handle
public void handle(jakarta.servlet.ServletContext context, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws IOExceptionVersion ofHttpAdapter.handle(WSHTTPConnection)that takes convenient parameters for servlet.- Parameters:
context- Servlet Contextrequest- Servlet Requestresponse- Servlet Response- Throws:
IOException- when there is i/o error in handling request
-
createConnection
protected WSHTTPConnection createConnection(jakarta.servlet.ServletContext context, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
-
invokeAsync
public void invokeAsync(jakarta.servlet.ServletContext context, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, HttpAdapter.CompletionCallback callback) throws IOExceptionVersion ofHttpAdapter.handle(WSHTTPConnection)that takes convenient parameters for servlet. Based on the async capabilities of the request and the application processing it, the method may run in asynchronous mode. When run in async mode, this method returns immediately. The response is delayed until the application is ready with the response or the corresponding asynchronous operation times out. The CompletionCallback is guaranteed to run after response is committed..- Parameters:
context- Servlet Contextrequest- Servlet Requestresponse- Servlet Responsecallback- CompletionCallback- Throws:
IOException- when there is i/o error in handling request
-
publishWSDL
public void publishWSDL(jakarta.servlet.ServletContext context, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws IOExceptionDeprecated.- Parameters:
context- Servlet Contextrequest- Servlet Requestresponse- Servlet Response- Throws:
IOException- when there is i/o error in handling request
-
-