Class Swift_Transport_LoadBalancedTransport

InheritanceSwift_Transport_LoadBalancedTransport
ImplementsSwift_Transport
SubclassesSwift_FailoverTransport, Swift_LoadBalancedTransport, Swift_Transport_FailoverTransport

Redundantly and rotationally uses several Transports when sending.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__construct() Swift_Transport_LoadBalancedTransport
getLastUsedTransport() Get the Transport used in the last successful send operation. 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

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

Method Details

__construct() public method

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 ( )
getLastUsedTransport() public method

Get the Transport used in the last successful send operation.

public Swift_Transport getLastUsedTransport ( )
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, &$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 ( )