C# Class EducationPathways.ServiceBus.Handling.MessageProcessor

Provides basic common processing code for components that handle incoming messages from a receiver.
Inheritance: IProcessor, IDisposable
Exibir arquivo Open project: pebblecode/EducationPathways

Public Methods

Method Description
Dispose ( ) : void

Disposes the resources used by the processor.

Start ( ) : void

Starts the listener.

Stop ( ) : void

Stops the listener.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Disposes the resources used by the processor.

MessageProcessor ( IMessageReceiver receiver, ITextSerializer serializer ) : System

Initializes a new instance of the MessageProcessor class.

ProcessMessage ( string traceIdentifier, object payload, string messageId, string correlationId ) : void

Processes the message.

Private Methods

Method Description
BuildTraceIdentifier ( BrokeredMessage message ) : string
CompleteMessage ( BrokeredMessage message, string traceIdentifier ) : MessageReleaseAction
HandleProcessingException ( BrokeredMessage message, string traceIdentifier, Exception e ) : MessageReleaseAction
OnMessageReceived ( BrokeredMessage message ) : MessageReleaseAction
ThrowIfDisposed ( ) : void

Method Details

Dispose() public method

Disposes the resources used by the processor.
public Dispose ( ) : void
return void

Dispose() protected method

Disposes the resources used by the processor.
protected Dispose ( bool disposing ) : void
disposing bool
return void

MessageProcessor() protected method

Initializes a new instance of the MessageProcessor class.
protected MessageProcessor ( IMessageReceiver receiver, ITextSerializer serializer ) : System
receiver IMessageReceiver
serializer ITextSerializer
return System

ProcessMessage() protected abstract method

Processes the message.
protected abstract ProcessMessage ( string traceIdentifier, object payload, string messageId, string correlationId ) : void
traceIdentifier string The identifier that can be used to track the source message in the logs.
payload object The typed message payload.
messageId string The message id.
correlationId string The message correlation id.
return void

Start() public method

Starts the listener.
public Start ( ) : void
return void

Stop() public method

Stops the listener.
public Stop ( ) : void
return void