MessageEnvelope

Overview

The MessageEnvelope base class provides basic functionality for envelopes.

Envelopes are a mechanism that allows applications to modify data packets right before they are sent over the network or immediately before or after they were received. Envelopes can work with any message type, although they do not conform to SOAP or XML-RPC standards (for obvious reasons).

Note: For more information on envelopes usage in the Remoting SDK, please refer to this article. Please also look at the MegaDemo sample shipped with Remoting SDK to see message envelopes in action.

Location


 

constructor  protected

Creates a new instance of the MessageEnvelope class.

 

constructor

 

MessageEnvelope()

 

Sub New()

constructor (String)  protected

 

constructor(envelopeMarker: String)

 

MessageEnvelope(String envelopeMarker)

 

Sub New(envelopeMarker As String)

Parameters:

  • envelopeMarker:

AfterEnvelopeProcessed

This event is raised after the message data is processed. MessageEnvelopeProcessedEventArgs will hold the data that specifies which envelope was used, which stream contains the message data and which actions were applied.

 

event AfterEnvelopeProcessed: EventHandler<MessageEnvelopeProcessedEventArgs>;

 

delegate EventHandler<MessageEnvelopeProcessedEventArgs> AfterEnvelopeProcessed()

 

Event AfterEnvelopeProcessed As EventHandler<MessageEnvelopeProcessedEventArgs>

BeforeEnvelopeProcessed

This event is raised before the message data is processed. MessageEnvelopeProcessedEventArgs will hold the data that specifies which envelope was used, which stream contains the message data and which actions were applied.

 

event BeforeEnvelopeProcessed: EventHandler<MessageEnvelopeProcessedEventArgs>;

 

delegate EventHandler<MessageEnvelopeProcessedEventArgs> BeforeEnvelopeProcessed()

 

Event BeforeEnvelopeProcessed As EventHandler<MessageEnvelopeProcessedEventArgs>

DefaultEnvelopeMarker

Envelope type marker. This marker should be provided by the concrete Message Envelope implementation. Each envelope realization should provide a unique DefaultEnvelopeMarker.

 

property DefaultEnvelopeMarker: String read;

 

String DefaultEnvelopeMarker { get; }

 

ReadOnly Property DefaultEnvelopeMarker() As String

EnvelopeMarker

This marker is used when an incoming data stream is processed to determine which envelope from the Message.Envelopes collection should be used to process the data.

 

property EnvelopeMarker: String read write;

 

String EnvelopeMarker { get; set; }

 

Property EnvelopeMarker() As String

TriggerAfterEnvelopeProcessed  protected

 

method TriggerAfterEnvelopeProcessed(stream: Stream; action: MessageEnvelopeAction)

 

void TriggerAfterEnvelopeProcessed(Stream stream, MessageEnvelopeAction action)

 

Sub TriggerAfterEnvelopeProcessed(stream As Stream, action As MessageEnvelopeAction)

Parameters:

  • stream:
  • action:

TriggerBeforeEnvelopeProcessed  protected

 

method TriggerBeforeEnvelopeProcessed(stream: Stream; action: MessageEnvelopeAction)

 

void TriggerBeforeEnvelopeProcessed(Stream stream, MessageEnvelopeAction action)

 

Sub TriggerBeforeEnvelopeProcessed(stream As Stream, action As MessageEnvelopeAction)

Parameters:

  • stream:
  • action:

Unwrap

 

method Unwrap(stream: Stream): Stream

 

Stream Unwrap(Stream stream)

 

Function Unwrap(stream As Stream) As Stream

Parameters:

  • stream:

Wrap

 

method Wrap(message: Message; stream: Stream): Stream

 

Stream Wrap(Message message, Stream stream)

 

Function Wrap(message As Message, stream As Stream) As Stream

Parameters:

  • message:
  • stream:

 

DefaultEnvelopeMarker

Envelope type marker. This marker should be provided by the concrete Message Envelope implementation. Each envelope realization should provide a unique DefaultEnvelopeMarker.

 

property DefaultEnvelopeMarker: String read;

 

String DefaultEnvelopeMarker { get; }

 

ReadOnly Property DefaultEnvelopeMarker() As String

EnvelopeMarker

This marker is used when an incoming data stream is processed to determine which envelope from the Message.Envelopes collection should be used to process the data.

 

property EnvelopeMarker: String read write;

 

String EnvelopeMarker { get; set; }

 

Property EnvelopeMarker() As String

 

constructor  protected

Creates a new instance of the MessageEnvelope class.

 

constructor

 

MessageEnvelope()

 

Sub New()

constructor (String)  protected

 

constructor(envelopeMarker: String)

 

MessageEnvelope(String envelopeMarker)

 

Sub New(envelopeMarker As String)

Parameters:

  • envelopeMarker:

TriggerAfterEnvelopeProcessed  protected

 

method TriggerAfterEnvelopeProcessed(stream: Stream; action: MessageEnvelopeAction)

 

void TriggerAfterEnvelopeProcessed(Stream stream, MessageEnvelopeAction action)

 

Sub TriggerAfterEnvelopeProcessed(stream As Stream, action As MessageEnvelopeAction)

Parameters:

  • stream:
  • action:

TriggerBeforeEnvelopeProcessed  protected

 

method TriggerBeforeEnvelopeProcessed(stream: Stream; action: MessageEnvelopeAction)

 

void TriggerBeforeEnvelopeProcessed(Stream stream, MessageEnvelopeAction action)

 

Sub TriggerBeforeEnvelopeProcessed(stream As Stream, action As MessageEnvelopeAction)

Parameters:

  • stream:
  • action:

Unwrap

 

method Unwrap(stream: Stream): Stream

 

Stream Unwrap(Stream stream)

 

Function Unwrap(stream As Stream) As Stream

Parameters:

  • stream:

Wrap

 

method Wrap(message: Message; stream: Stream): Stream

 

Stream Wrap(Message message, Stream stream)

 

Function Wrap(message As Message, stream As Stream) As Stream

Parameters:

  • message:
  • stream:

 

AfterEnvelopeProcessed

This event is raised after the message data is processed. MessageEnvelopeProcessedEventArgs will hold the data that specifies which envelope was used, which stream contains the message data and which actions were applied.

 

event AfterEnvelopeProcessed: EventHandler<MessageEnvelopeProcessedEventArgs>;

 

delegate EventHandler<MessageEnvelopeProcessedEventArgs> AfterEnvelopeProcessed()

 

Event AfterEnvelopeProcessed As EventHandler<MessageEnvelopeProcessedEventArgs>

BeforeEnvelopeProcessed

This event is raised before the message data is processed. MessageEnvelopeProcessedEventArgs will hold the data that specifies which envelope was used, which stream contains the message data and which actions were applied.

 

event BeforeEnvelopeProcessed: EventHandler<MessageEnvelopeProcessedEventArgs>;

 

delegate EventHandler<MessageEnvelopeProcessedEventArgs> BeforeEnvelopeProcessed()

 

Event BeforeEnvelopeProcessed As EventHandler<MessageEnvelopeProcessedEventArgs>