Skip to content

Latest commit

 

History

History
118 lines (75 loc) · 3.13 KB

message-processor-class.md

File metadata and controls

118 lines (75 loc) · 3.13 KB
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: message_processor Class
message_processor Class
11/04/2016
message_processor
AGENTS/concurrency::message_processor
AGENTS/concurrency::message_processor::async_send
AGENTS/concurrency::message_processor::sync_send
AGENTS/concurrency::message_processor::wait
AGENTS/concurrency::message_processor::process_incoming_message
message_processor class
23afb052-daa7-44ed-bf24-d2513db748da

message_processor Class

The message_processor class is the abstract base class for processing of message objects. There is no guarantee on the ordering of the messages.

Syntax

template<class T>
class message_processor;

Parameters

T
The data type of the payload within messages handled by this message_processor object.

Members

Public Typedefs

Name Description
type A type alias for T.

Public Methods

Name Description
async_send When overridden in a derived class, places messages into the block asynchronously.
sync_send When overridden in a derived class, places messages into the block synchronously.
wait When overridden in a derived class, waits for all asynchronous operations to complete.

Protected Methods

Name Description
process_incoming_message When overridden in a derived class, performs the forward processing of messages into the block. Called once every time a new message is added and the queue is found to be empty.

Inheritance Hierarchy

message_processor

Requirements

Header: agents.h

Namespace: concurrency

async_send

When overridden in a derived class, places messages into the block asynchronously.

virtual void async_send(_Inout_opt_ message<T>* _Msg) = 0;

Parameters

_Msg
A message object to send asynchronously.

Remarks

Processor implementations should override this method.

process_incoming_message

When overridden in a derived class, performs the forward processing of messages into the block. Called once every time a new message is added and the queue is found to be empty.

virtual void process_incoming_message() = 0;

Remarks

Message block implementations should override this method.

sync_send

When overridden in a derived class, places messages into the block synchronously.

virtual void sync_send(_Inout_opt_ message<T>* _Msg) = 0;

Parameters

_Msg
A message object to send synchronously.

Remarks

Processor implementations should override this method.

wait

When overridden in a derived class, waits for all asynchronous operations to complete.

virtual void wait() = 0;

Remarks

Processor implementations should override this method.

See also

concurrency Namespace
ordered_message_processor Class