@Deprecated public abstract class AbstractJDomPayloadEndpoint extends TransformerObjectSupport implements PayloadEndpoint
Offers the message payload as a JDOM Element
, and allows subclasses to create a response by returning an
Element
.
logger
Constructor and Description |
---|
AbstractJDomPayloadEndpoint()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected org.jdom2.Element |
getDocumentElement(Source source)
Deprecated.
Returns the payload element of the given source.
|
Source |
invoke(Source request)
Deprecated.
Invokes the endpoint with the given request payload, and possibly returns a response.
|
protected abstract org.jdom2.Element |
invokeInternal(org.jdom2.Element requestElement)
Deprecated.
Template method.
|
void |
setAlwaysTransform(boolean alwaysTransform)
Deprecated.
Set if the request
Source should always be transformed into a new JDOMResult . |
createTransformer, getTransformerFactory, newTransformerFactory, setTransformerFactoryClass, transform
public void setAlwaysTransform(boolean alwaysTransform)
Source
should always be transformed into a new JDOMResult
.
Default is false
, which is faster.
public final Source invoke(Source request) throws Exception
PayloadEndpoint
invoke
in interface PayloadEndpoint
request
- the payload of the request message, may be null
null
to indicate no responseException
- if an exception occursprotected org.jdom2.Element getDocumentElement(Source source) throws TransformerException
Default implementation checks whether the source is a DOMSource
, and uses a DOMBuilder
to create
a JDOM Element
. In all other cases, or when alwaysTransform is
true
, the source is transformed into a JDOMResult
, which is more expensive. If the passed source
is null
, null
is returned.
source
- the source to return the root element of; can be null
TransformerException
- in case of errorsprotected abstract org.jdom2.Element invokeInternal(org.jdom2.Element requestElement) throws Exception
Element
, and
allows subclasses to return a response Element
.requestElement
- the contents of the SOAP message as JDOM elementnull
to specify no response.Exception
Copyright © 2020 Pivotal Software. All rights reserved.