Class SimpleMessageConverter
public class SimpleMessageConverter : IMessageConverter, IServiceNameAware
- Inheritance
-
SimpleMessageConverter
- Implements
- Derived
- Inherited Members
Fields
DEFAULT_SERVICE_NAME
public const string DEFAULT_SERVICE_NAME = "SimpleMessageConverter"
Field Value
Properties
ServiceName
public string ServiceName { get; set; }
Property Value
Methods
FromMessage(IMessage, Type)
Convert the payload of a message to a typed object.
public virtual object FromMessage(IMessage message, Type targetClass)
Parameters
Returns
- object
the result of the conversion
FromMessage<T>(IMessage)
Convert the payload of a message to a typed object.
public virtual T FromMessage<T>(IMessage message)
Parameters
message
IMessagethe input message
Returns
- T
the result of the conversion
Type Parameters
T
the target type for the conversion
ToMessage(object, IMessageHeaders)
Create a message whose payload is the result of converting the given payload object to serialized form.
public virtual IMessage ToMessage(object payload, IMessageHeaders headers)
Parameters
payload
objectthe object to convert
headers
IMessageHeadersoptional headers for the message
Returns
- IMessage
the new messagee or null if converter does not support the payload type