Class Swift_Transport_LoadBalancedTransport
Inheritance | Swift_Transport_LoadBalancedTransport |
---|---|
Implements | Swift_Transport |
Subclasses | Swift_FailoverTransport, Swift_LoadBalancedTransport, Swift_Transport_FailoverTransport |
Redundantly and rotationally uses several Transports when sending.
Protected Properties
Property | Type | Description | Defined By |
---|---|---|---|
$_transports | Swift_Transport[] | Swift_Transport_LoadBalancedTransport |
Public Methods
Method | Description | Defined 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
Method | Description | Defined 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
Method Details
Creates a new LoadBalancedTransport.
public void __construct ( ) |
Rotates the transport list around and returns the first instance.
protected Swift_Transport _getNextTransport ( ) |
Tag the currently used (top of stack) transport as dead/useless.
protected void _killCurrentTransport ( ) |
Get $transports to delegate to.
public Swift_Transport[] getTransports ( ) |
Test if this Transport mechanism has started.
public bool isStarted ( ) |
Register a plugin.
public void registerPlugin ( Swift_Events_EventListener $plugin ) | ||
$plugin | Swift_Events_EventListener |
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 |
Set $transports to delegate to.
public void setTransports ( array $transports ) | ||
$transports | Swift_Transport[] |
Start this Transport mechanism.
public void start ( ) |
Stop this Transport mechanism.
public void stop ( ) |