Class Swift_Transport_LoadBalancedTransport

InheritanceSwift_Transport_LoadBalancedTransport
ImplementsSwift_Transport
SubclassesSwift_FailoverTransport, Swift_LoadBalancedTransport, Swift_Transport_FailoverTransport

Redundantly and rotationally uses several Transports when sending.

Protected Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$_transports Swift_Transport[] Swift_Transport_LoadBalancedTransport

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__construct() Creates a new LoadBalancedTransport. Swift_Transport_LoadBalancedTransport
getTransports() Get $transports to delegate to. Swift_Transport_LoadBalancedTransport
isStarted() Test if this Transport mechanism has started. Swift_Transport_LoadBalancedTransport
registerPlugin() Register a plugin. Swift_Transport_LoadBalancedTransport
send() Send the given Message. Swift_Transport_LoadBalancedTransport
setTransports() Set $transports to delegate to. Swift_Transport_LoadBalancedTransport
start() Start this Transport mechanism. Swift_Transport_LoadBalancedTransport
stop() Stop this Transport mechanism. Swift_Transport_LoadBalancedTransport

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
_getNextTransport() Rotates the transport list around and returns the first instance. Swift_Transport_LoadBalancedTransport
_killCurrentTransport() Tag the currently used (top of stack) transport as dead/useless. Swift_Transport_LoadBalancedTransport

Property Details

$_transports protected property
protected Swift_Transport[] $_transports = []

Method Details

__construct() public method

Creates a new LoadBalancedTransport.

public void __construct ( )
_getNextTransport() protected method

Rotates the transport list around and returns the first instance.

protected Swift_Transport _getNextTransport ( )
_killCurrentTransport() protected method

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

protected void _killCurrentTransport ( )
getTransports() public method

Get $transports to delegate to.

public Swift_Transport[] getTransports ( )
isStarted() public method

Test if this Transport mechanism has started.

public bool isStarted ( )
registerPlugin() public method

Register a plugin.

public void registerPlugin ( Swift_Events_EventListener $plugin )
$plugin Swift_Events_EventListener
send() public method

Send the given Message.

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

public int send ( Swift_Mime_Message $message, <b>&</b>$failedRecipients null )
$message Swift_Mime_Message
$failedRecipients string[]

An array of failures by-reference

setTransports() public method

Set $transports to delegate to.

public void setTransports ( array $transports )
$transports Swift_Transport[]
start() public method

Start this Transport mechanism.

public void start ( )
stop() public method

Stop this Transport mechanism.

public void stop ( )