Diffusion .NET Classic API - Core and Common  5.9.4
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
PushTechnology.DiffusionCore.Messaging.Encoding.MessageConverter Class Referenceabstract

A message converter is used for encoding or decoding of messages. More...

Inheritance diagram for PushTechnology.DiffusionCore.Messaging.Encoding.MessageConverter:
PushTechnology.DiffusionCore.Messaging.Encoding.MessageBase64Decoder PushTechnology.DiffusionCore.Messaging.Encoding.MessageBase64Encoder PushTechnology.DiffusionCore.Messaging.Encoding.MessageCompressor PushTechnology.DiffusionCore.Messaging.Encoding.MessageDecompressor PushTechnology.DiffusionCore.Messaging.Encoding.MessageDecrypter PushTechnology.DiffusionCore.Messaging.Encoding.MessageEncrypter

Public Member Functions

ByteBuffer Convert (ByteBuffer inputByteBuffer, int headerLength)
 Convert the message in the input byte buffer to the target encoding. More...
 

Protected Member Functions

 MessageConverter (MessageEncodingType targetEncoding)
 Constructor. More...
 
abstract int DoConvert (byte[] data)
 This does the actual conversion, setting the output into the output buffer. More...
 
abstract void Reset ()
 Used to reset the converter after use. More...
 

Properties

byte[] OutputBuffer [get, set]
 The output buffer which must be correctly populated after each call to DoConvert. Subclasses may choose to precreate the output buffer or create a new one each time. More...
 

Detailed Description

A message converter is used for encoding or decoding of messages.

Constructor & Destructor Documentation

PushTechnology.DiffusionCore.Messaging.Encoding.MessageConverter.MessageConverter ( MessageEncodingType  targetEncoding)
protected

Constructor.

Parameters
targetEncoding

Member Function Documentation

ByteBuffer PushTechnology.DiffusionCore.Messaging.Encoding.MessageConverter.Convert ( ByteBuffer  inputByteBuffer,
int  headerLength 
)

Convert the message in the input byte buffer to the target encoding.

Parameters
inputByteBufferInput buffer. The position is not relevant and will remain the same after a call to this operation.
headerLengthThe length of the message header.
Returns
An output buffer containing the converted message - the position will be just after the header on exit. If null is returned, then it means that conversion was inappropriate and so the input should be used.

Property Documentation

byte [] PushTechnology.DiffusionCore.Messaging.Encoding.MessageConverter.OutputBuffer
getset

The output buffer which must be correctly populated after each call to DoConvert. Subclasses may choose to precreate the output buffer or create a new one each time.