XOOPS RMCommon Utilities  2.1.8.91RC
 All Classes Namespaces Files Functions Variables
Swift_Transport_LoadBalancedTransport Class Reference
Inheritance diagram for Swift_Transport_LoadBalancedTransport:
Inheritance graph

Public Member Functions

 __construct ()
 
 getTransports (array $transports)
 
 isStarted ()
 
 registerPlugin (Swift_Events_EventListener $plugin)
 
 send (Swift_Mime_Message $message, &$failedRecipients=null)
 
 setTransports (array $transports)
 
 start ()
 
 stop ()
 

Protected Member Functions

 _getNextTransport ()
 
 _killCurrentTransport ()
 

Protected Attributes

 $_transports = array()
 

Private Attributes

 $_deadTransports = array()
 

Detailed Description

Definition at line 22 of file LoadBalancedTransport.php.

Constructor & Destructor Documentation

Swift_Transport_LoadBalancedTransport::__construct ( )

Creates a new LoadBalancedTransport.

Definition at line 39 of file LoadBalancedTransport.php.

Member Function Documentation

Swift_Transport_LoadBalancedTransport::_getNextTransport ( )
protected

Rotates the transport list around and returns the first instance.

Returns
Swift_Transport protected

Definition at line 159 of file LoadBalancedTransport.php.

Referenced by send().

Here is the caller graph for this function:

Swift_Transport_LoadBalancedTransport::_killCurrentTransport ( )
protected

Tag the currently used (top of stack) transport as dead/useless.

protected

Definition at line 173 of file LoadBalancedTransport.php.

Referenced by send().

Here is the caller graph for this function:

Swift_Transport_LoadBalancedTransport::getTransports ( array  $transports)

Get $transports to delegate to.

Returns
array Swift_Transport

Definition at line 59 of file LoadBalancedTransport.php.

Swift_Transport_LoadBalancedTransport::isStarted ( )

Test if this Transport mechanism has started.

Returns
boolean

Implements Swift_Transport.

Definition at line 69 of file LoadBalancedTransport.php.

Swift_Transport_LoadBalancedTransport::registerPlugin ( Swift_Events_EventListener  $plugin)

Register a plugin.

Parameters
Swift_Events_EventListener$plugin

Implements Swift_Transport.

Definition at line 143 of file LoadBalancedTransport.php.

Swift_Transport_LoadBalancedTransport::send ( Swift_Mime_Message  $message,
$failedRecipients = null 
)

Send the given Message.

Recipient/sender data will be retreived from the Message API. The return value is the number of recipients who were accepted for delivery.

Parameters
Swift_Mime_Message$message
string[]&$failedRecipients to collect failures by-reference
Returns
int

Implements Swift_Transport.

Definition at line 103 of file LoadBalancedTransport.php.

References $i, _getNextTransport(), and _killCurrentTransport().

Here is the call graph for this function:

Swift_Transport_LoadBalancedTransport::setTransports ( array  $transports)

Set $transports to delegate to.

Parameters
array$transportsSwift_Transport

Definition at line 48 of file LoadBalancedTransport.php.

Referenced by Swift_FailoverTransport\__construct(), and Swift_LoadBalancedTransport\__construct().

Here is the caller graph for this function:

Swift_Transport_LoadBalancedTransport::start ( )

Start this Transport mechanism.

Implements Swift_Transport.

Definition at line 77 of file LoadBalancedTransport.php.

Swift_Transport_LoadBalancedTransport::stop ( )

Stop this Transport mechanism.

Implements Swift_Transport.

Definition at line 85 of file LoadBalancedTransport.php.

Member Data Documentation

Swift_Transport_LoadBalancedTransport::$_deadTransports = array()
private

Transports which are deemed useless

Definition at line 26 of file LoadBalancedTransport.php.

Swift_Transport_LoadBalancedTransport::$_transports = array()
protected

Definition at line 34 of file LoadBalancedTransport.php.


The documentation for this class was generated from the following file: