|
Spring Web Services Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.xml.transform.TransformerObjectSupport
org.springframework.ws.server.endpoint.AbstractSaxPayloadEndpoint
public abstract class AbstractSaxPayloadEndpoint
Abstract base class for endpoints that handle the message payload with a SAX ContentHandler
. Allows
subclasses to create a response by returning a Source
.
Implementations of this class should create a new handler for each call of createContentHandler
, because
of thread safety. The handlers is later passed on to createResponse
, so it can be used for holding
request-specific state.
createContentHandler()
,
getResponse(org.xml.sax.ContentHandler)
Field Summary |
---|
Fields inherited from class org.springframework.xml.transform.TransformerObjectSupport |
---|
logger |
Constructor Summary | |
---|---|
AbstractSaxPayloadEndpoint()
|
Method Summary | |
---|---|
protected abstract ContentHandler |
createContentHandler()
Returns the SAX ContentHandler used to parse the incoming request payload. |
protected abstract Source |
getResponse(ContentHandler contentHandler)
Returns the response to be given, if any. |
Source |
invoke(Source request)
Invokes the provided ContentHandler on the given request. |
Methods inherited from class org.springframework.xml.transform.TransformerObjectSupport |
---|
createTransformer, getTransformerFactory, newTransformerFactory, setTransformerFactoryClass, transform |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractSaxPayloadEndpoint()
Method Detail |
---|
public final Source invoke(Source request) throws Exception
ContentHandler
on the given request. After parsing has been done, the provided
response is returned.
invoke
in interface PayloadEndpoint
request
- the payload of the request message, may be null
null
to indicate no response
Exception
- if an exception occurscreateContentHandler()
,
getResponse(org.xml.sax.ContentHandler)
protected abstract ContentHandler createContentHandler() throws Exception
ContentHandler
used to parse the incoming request payload. A new instance should be
created for each call, because of thread-safety. The content handler can be used to hold request-specific state.
If an incoming message does not contain a payload, this method will not be invoked.
Exception
protected abstract Source getResponse(ContentHandler contentHandler) throws Exception
ContentHandler
. The passed ContentHandler
is created by createContentHandler()
: it can be used to hold request-specific state.
If an incoming message does not contain a payload, this method will be invoked with null
as content
handler.
contentHandler
- the content handler used to parse the request
Exception
|
Spring Web Services Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |