C# 클래스 Spring.Messaging.Nms.Support.Converter.SimpleMessageConverter

A simple message converter that can handle ITextMessages, IBytesMessages, IMapMessages, and IObjectMessages. Used as default by NmsTemplate, for ConvertAndSend and ReceiveAndConvert operations.

Converts a String to a NMS ITextMessage, a byte array to a NMS IBytesMessage, a Map to a NMS IMapMessage, and a Serializable object to a NMS IObjectMessage (or vice versa).

상속: IMessageConverter
파일 보기 프로젝트 열기: spring-projects/spring-net 1 사용 예제들

공개 메소드들

메소드 설명
FromMessage ( IMessage messageToConvert ) : object

Convert from a NMS Message to a .NET object.

ToMessage ( object objectToConvert, ISession session ) : IMessage

Convert a .NET object to a NMS Message using the supplied session to create the message object.

보호된 메소드들

메소드 설명
CreateMessageForByteArray ( byte bytes, ISession session ) : IBytesMessage

Create a NMS IBytesMessage for the given byte array.

CreateMessageForMap ( IDictionary map, ISession session ) : IMapMessage

Create a NMS IMapMessage for the given Map.

CreateMessageForSerializable ( object objectToSend, ISession session ) : IObjectMessage

Create a NMS IObjectMessage for the given Serializable object.

CreateMessageForString ( string text, ISession session ) : ITextMessage

Create a NMS ITextMessage for the given String.

ExtractByteArrayFromMessage ( IBytesMessage message ) : byte[]

Extract a byte array from the given IBytesMessage.

ExtractMapFromMessage ( IMapMessage message ) : IDictionary

Extract a IDictionary from the given IMapMessage.

ExtractSerializableFromMessage ( IObjectMessage message ) : object

Extracts the serializable object from the given object message.

ExtractStringFromMessage ( ITextMessage message ) : string

Extract a String from the given ITextMessage.

메소드 상세

CreateMessageForByteArray() 보호된 메소드

Create a NMS IBytesMessage for the given byte array.
protected CreateMessageForByteArray ( byte bytes, ISession session ) : IBytesMessage
bytes byte the byyte array to convert ///
session ISession current NMS session ///
리턴 IBytesMessage

CreateMessageForMap() 보호된 메소드

Create a NMS IMapMessage for the given Map.
protected CreateMessageForMap ( IDictionary map, ISession session ) : IMapMessage
map IDictionary the Map to convert ///
session ISession current NMS session ///
리턴 IMapMessage

CreateMessageForSerializable() 보호된 메소드

Create a NMS IObjectMessage for the given Serializable object.
protected CreateMessageForSerializable ( object objectToSend, ISession session ) : IObjectMessage
objectToSend object the Serializable object to convert ///
session ISession current NMS session ///
리턴 IObjectMessage

CreateMessageForString() 보호된 메소드

Create a NMS ITextMessage for the given String.
protected CreateMessageForString ( string text, ISession session ) : ITextMessage
text string the String to convert ///
session ISession current NMS session ///
리턴 ITextMessage

ExtractByteArrayFromMessage() 보호된 메소드

Extract a byte array from the given IBytesMessage.
protected ExtractByteArrayFromMessage ( IBytesMessage message ) : byte[]
message IBytesMessage the message to convert ///
리턴 byte[]

ExtractMapFromMessage() 보호된 메소드

Extract a IDictionary from the given IMapMessage.
protected ExtractMapFromMessage ( IMapMessage message ) : IDictionary
message IMapMessage the message to convert ///
리턴 IDictionary

ExtractSerializableFromMessage() 보호된 메소드

Extracts the serializable object from the given object message.
protected ExtractSerializableFromMessage ( IObjectMessage message ) : object
message IObjectMessage The message to convert.
리턴 object

ExtractStringFromMessage() 보호된 메소드

Extract a String from the given ITextMessage.
protected ExtractStringFromMessage ( ITextMessage message ) : string
message ITextMessage the message to convert ///
리턴 string

FromMessage() 공개 메소드

Convert from a NMS Message to a .NET object.
public FromMessage ( IMessage messageToConvert ) : object
messageToConvert IMessage the message to convert ///
리턴 object

ToMessage() 공개 메소드

Convert a .NET object to a NMS Message using the supplied session to create the message object.
public ToMessage ( object objectToConvert, ISession session ) : IMessage
objectToConvert object the object to convert ///
session ISession the Session to use for creating a NMS Message ///
리턴 IMessage