Class DeliveryAgent.

Inherits EventHandler

Responsible for attempting to deliver a queued message and updating the corresponding row in the deliveries table.

DeliveryAgent::DeliveryAgent( uint id )

Creates a new DeliveryAgent object to deliver the message with the given id.

void DeliveryAgent::createDSN()

Returns a pointer to a newly-created DSN for the DA's message, based on earlier queries. All queries are assumed to have completed successfully.

void DeliveryAgent::expireRecipients( DSN * dsn )

Updates all recipients for the given dsn to reflect that the message delivery request has expired.

Message * DeliveryAgent::fetchMessage( uint messageId )

Begins to fetch a message with the given messageId, and returns a pointer to the newly-created Message object, which will be filled in by the message fetcher.

Injector * DeliveryAgent::injectBounce( DSN * dsn )

Returns a pointer to a newly-created Injector to inject a bounce message derived from the specified dsn, or 0 if the DSN was for a bounce already. The caller must call Injector::execute() when appropriate.

void DeliveryAgent::logDelivery( DSN * dsn )

Logs a description of the delivery we are about to attempt, based on the specified dsn.

uint DeliveryAgent::messageId() const

Returns the database ID of the message serviced, as specified to the constructor.

void DeliveryAgent::updateDelivery()

Updates the row in deliveries, as well as any related rows in delivery_recipients. The queries needed to perform the update are enqueued directly into d->t, for the caller to execute at will.

bool DeliveryAgent::working() const

Returns true if this DeliveryAgent is working on something, and false if not.

This web page based on source code belonging to The Archiveopteryx Developers. All rights reserved.