Class AbstractMessageConverter
Inheritance
System.Object
AbstractMessageConverter
Implements
IServiceNameAware
Assembly: Steeltoe.Messaging.MessagingBase.dll
Syntax
public abstract class AbstractMessageConverter : object, ISmartMessageConverter, IMessageConverter
Constructors
|
Edit this page
View Source
AbstractMessageConverter(ICollection<MimeType>)
Declaration
protected AbstractMessageConverter(ICollection<MimeType> supportedMimeTypes)
Parameters
Type |
Name |
Description |
ICollection<MimeType> |
supportedMimeTypes |
|
|
Edit this page
View Source
AbstractMessageConverter(MimeType)
Declaration
protected AbstractMessageConverter(MimeType supportedMimeType)
Parameters
Type |
Name |
Description |
MimeType |
supportedMimeType |
|
Properties
|
Edit this page
View Source
ContentTypeResolver
Declaration
public virtual IContentTypeResolver ContentTypeResolver { get; set; }
Property Value
|
Edit this page
View Source
SerializedPayloadClass
Declaration
public virtual Type SerializedPayloadClass { get; set; }
Property Value
|
Edit this page
View Source
ServiceName
Declaration
public abstract string ServiceName { get; set; }
Property Value
Type |
Description |
System.String |
|
|
Edit this page
View Source
StrictContentTypeMatch
Declaration
public virtual bool StrictContentTypeMatch { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
|
Edit this page
View Source
SupportedMimeTypes
Declaration
public virtual ICollection<MimeType> SupportedMimeTypes { get; }
Property Value
Type |
Description |
ICollection<MimeType> |
|
Methods
|
Edit this page
View Source
CanConvertFrom(IMessage, Type)
Declaration
public virtual bool CanConvertFrom(IMessage message, Type targetClass)
Parameters
Type |
Name |
Description |
IMessage |
message |
|
Type |
targetClass |
|
Returns
Type |
Description |
System.Boolean |
|
|
Edit this page
View Source
Declaration
public virtual bool CanConvertTo(object payload, IMessageHeaders headers = null)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Edit this page
View Source
ConvertFromInternal(IMessage, Type, Object)
Declaration
protected virtual object ConvertFromInternal(IMessage message, Type targetClass, object conversionHint)
Parameters
Type |
Name |
Description |
IMessage |
message |
|
Type |
targetClass |
|
System.Object |
conversionHint |
|
Returns
Type |
Description |
System.Object |
|
|
Edit this page
View Source
Declaration
protected virtual object ConvertToInternal(object payload, IMessageHeaders headers, object conversionHint)
Parameters
Type |
Name |
Description |
System.Object |
payload |
|
IMessageHeaders |
headers |
|
System.Object |
conversionHint |
|
Returns
Type |
Description |
System.Object |
|
|
Edit this page
View Source
FromMessage(IMessage, Type)
Declaration
public virtual object FromMessage(IMessage message, Type targetClass)
Parameters
Type |
Name |
Description |
IMessage |
message |
|
Type |
targetClass |
|
Returns
Type |
Description |
System.Object |
|
|
Edit this page
View Source
FromMessage(IMessage, Type, Object)
Declaration
public virtual object FromMessage(IMessage message, Type targetClass, object conversionHint)
Parameters
Type |
Name |
Description |
IMessage |
message |
|
Type |
targetClass |
|
System.Object |
conversionHint |
|
Returns
Type |
Description |
System.Object |
|
|
Edit this page
View Source
FromMessage<T>(IMessage)
Declaration
public virtual T FromMessage<T>(IMessage message)
Parameters
Returns
Type Parameters
|
Edit this page
View Source
FromMessage<T>(IMessage, Object)
Declaration
public virtual T FromMessage<T>(IMessage message, object conversionHint)
Parameters
Type |
Name |
Description |
IMessage |
message |
|
System.Object |
conversionHint |
|
Returns
Type Parameters
|
Edit this page
View Source
GetDefaultContentType(Object)
Declaration
protected virtual MimeType GetDefaultContentType(object payload)
Parameters
Type |
Name |
Description |
System.Object |
payload |
|
Returns
Type |
Description |
MimeType |
|
|
Edit this page
View Source
Declaration
protected virtual MimeType GetMimeType(IMessageHeaders headers)
Parameters
Returns
Type |
Description |
MimeType |
|
|
Edit this page
View Source
Supports(Type)
Declaration
protected abstract bool Supports(Type clazz)
Parameters
Type |
Name |
Description |
Type |
clazz |
|
Returns
Type |
Description |
System.Boolean |
|
|
Edit this page
View Source
Declaration
protected virtual bool SupportsMimeType(IMessageHeaders headers)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Edit this page
View Source
Declaration
public virtual IMessage ToMessage(object payload, IMessageHeaders headers)
Parameters
Returns
|
Edit this page
View Source
Declaration
public virtual IMessage ToMessage(object payload, IMessageHeaders headers, object conversionHint)
Parameters
Type |
Name |
Description |
System.Object |
payload |
|
IMessageHeaders |
headers |
|
System.Object |
conversionHint |
|
Returns
Implements
IServiceNameAware