messaging_controller Struct Reference
[Messaging API]

#include <messaging.h>

List of all members.

Public Attributes

void(* poll )(Connection *connection[], int count, int timeout)
void(* send_immediate )(Channel *channel, Message *message)
int(* process_messages )(Connection *connection, short limit)


Detailed Description

Messaging module functions related to message processing control.

A Messaging_Controller instance encapsulates those functions which perform an administrative role in message delivery rather than a user-focused role (send, receive, subscribe, etc). These are intended to be used by code which controls message delivery and execution to an application component (i.e. within an Execution instance) rather than from within the application component itself


Member Data Documentation

void(* messaging_controller::poll)(Connection *connection[], int count, int timeout)

Poll a number of Connections until a message is available.

Given an array of Connections, will block until at least one message in one of the given Connections is deliverable via Controller->process_messages(Connection * connection, short limit)) or the given timeout deadline has been reached. A "-1" timeout means block indefinitely, all other values signify a timeout in milliseconds. A value of "0" implies returning immediately.

Parameters:
connection Array of Connection instances.
count Number of Connection instances in the given array.
timeout Timeout value in milliseconds. -1 means infinite.

int(* messaging_controller::process_messages)(Connection *connection, short limit)

Deliver (execute callback in current thread) all pending messages.

Used in managing the execution of message delivery, typically by an Execution engine and not end users. Thus, use this only if you know what you're doing!

Parameters:
connection The connection whose pending messages shall be delivered
limit Upper limit placed on number of messages to deliver upon this invocation. A value of 0 or less implies "deliver all pending messages".
Returns:
number of messages delivered.

void(* messaging_controller::send_immediate)(Channel *channel, Message *message)

Send a message for "immediate" consumption, potentially bypassing others in queue.


The documentation for this struct was generated from the following file:
Generated on Wed Nov 14 12:01:02 2012 for VetSim Applications by  doxygen 1.4.7