DefaultMethodEndpointAdapter
and MarshallingPayloadMethodProcessor
.@Deprecated public class MarshallingMethodEndpointAdapter extends AbstractMethodEndpointAdapter implements org.springframework.beans.factory.InitializingBean
void handleMyMessage(MyUnmarshalledType request);or
MyMarshalledType handleMyMessage(MyUnmarshalledType request);I.e. methods that take a single parameter that
is supported
by the Unmarshaller
, and return either void
or a type supported
by the
Marshaller
. The method can have any name, as long as it is mapped by an EndpointMapping
.
This endpoint needs a Marshaller
and Unmarshaller
, both of which can be set using
properties.
setMarshaller(org.springframework.oxm.Marshaller)
,
setUnmarshaller(org.springframework.oxm.Unmarshaller)
logger
Constructor and Description |
---|
MarshallingMethodEndpointAdapter()
Deprecated.
Creates a new
MarshallingMethodEndpointAdapter . |
MarshallingMethodEndpointAdapter(org.springframework.oxm.Marshaller marshaller)
Deprecated.
Creates a new
MarshallingMethodEndpointAdapter with the given marshaller. |
MarshallingMethodEndpointAdapter(org.springframework.oxm.Marshaller marshaller,
org.springframework.oxm.Unmarshaller unmarshaller)
Deprecated.
Creates a new
MarshallingMethodEndpointAdapter with the given marshaller and unmarshaller. |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet()
Deprecated.
|
org.springframework.oxm.Marshaller |
getMarshaller()
Deprecated.
Returns the marshaller used for transforming objects into XML.
|
org.springframework.oxm.Unmarshaller |
getUnmarshaller()
Deprecated.
Returns the unmarshaller used for transforming XML into objects.
|
protected void |
invokeInternal(MessageContext messageContext,
MethodEndpoint methodEndpoint)
Deprecated.
Use the given method endpoint to handle the request.
|
void |
setMarshaller(org.springframework.oxm.Marshaller marshaller)
Deprecated.
Sets the marshaller used for transforming objects into XML.
|
void |
setUnmarshaller(org.springframework.oxm.Unmarshaller unmarshaller)
Deprecated.
Sets the unmarshaller used for transforming XML into objects.
|
protected boolean |
supportsInternal(MethodEndpoint methodEndpoint)
Deprecated.
Supports a method with a single, unmarshallable parameter, and that return
void or a marshallable
type. |
invoke, supports
createTransformer, getTransformerFactory, newTransformerFactory, setTransformerFactoryClass, transform
public MarshallingMethodEndpointAdapter()
MarshallingMethodEndpointAdapter
. The Marshaller
and Unmarshaller
must
be injected using properties.public MarshallingMethodEndpointAdapter(org.springframework.oxm.Marshaller marshaller)
MarshallingMethodEndpointAdapter
with the given marshaller. If the given Marshaller
also implements the Unmarshaller
interface, it is used for both marshalling and
unmarshalling. Otherwise, an exception is thrown.
Note that all Marshaller
implementations in Spring also implement the Unmarshaller
interface,
so that you can safely use this constructor.
marshaller
- object used as marshaller and unmarshallerIllegalArgumentException
- when marshaller
does not implement the Unmarshaller
interfacepublic MarshallingMethodEndpointAdapter(org.springframework.oxm.Marshaller marshaller, org.springframework.oxm.Unmarshaller unmarshaller)
MarshallingMethodEndpointAdapter
with the given marshaller and unmarshaller.marshaller
- the marshaller to useunmarshaller
- the unmarshaller to usepublic org.springframework.oxm.Marshaller getMarshaller()
public final void setMarshaller(org.springframework.oxm.Marshaller marshaller)
public org.springframework.oxm.Unmarshaller getUnmarshaller()
public final void setUnmarshaller(org.springframework.oxm.Unmarshaller unmarshaller)
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
Exception
protected void invokeInternal(MessageContext messageContext, MethodEndpoint methodEndpoint) throws Exception
AbstractMethodEndpointAdapter
invokeInternal
in class AbstractMethodEndpointAdapter
messageContext
- the current message contextmethodEndpoint
- the method endpoint to useException
- in case of errorsprotected boolean supportsInternal(MethodEndpoint methodEndpoint)
void
or a marshallable
type.supportsInternal
in class AbstractMethodEndpointAdapter
methodEndpoint
- method endpoint to checkMarshaller.supports(Class)
,
Unmarshaller.supports(Class)
Copyright © 2020 Pivotal Software. All rights reserved.