Swift_LoadBalancedTransport
extends Swift_Transport_LoadBalancedTransport
in package
Redundantly and rotationally uses several Transport implementations when sending.
Tags
Table of Contents
- $lastUsedTransport : Swift_Transport
- The Transport used in the last successful send operation.
- $transports : array<string|int, Swift_Transport>
- The Transports which are used in rotation.
- $deadTransports : array<string|int, Swift_Transport>
- Transports which are deemed useless.
- __construct() : mixed
- Creates a new LoadBalancedTransport with $transports.
- getLastUsedTransport() : Swift_Transport
- Get the Transport used in the last successful send operation.
- getTransports() : array<string|int, Swift_Transport>
- Get $transports to delegate to.
- isStarted() : bool
- Test if this Transport mechanism has started.
- ping() : bool
- Check if this Transport mechanism is alive.
- registerPlugin() : mixed
- Register a plugin.
- send() : int
- Send the given Message.
- setTransports() : mixed
- Set $transports to delegate to.
- start() : mixed
- Start this Transport mechanism.
- stop() : mixed
- Stop this Transport mechanism.
- getNextTransport() : Swift_Transport
- Rotates the transport list around and returns the first instance.
- killCurrentTransport() : mixed
- Tag the currently used (top of stack) transport as dead/useless.
Properties
$lastUsedTransport
The Transport used in the last successful send operation.
protected
Swift_Transport
$lastUsedTransport
=
ull
$transports
The Transports which are used in rotation.
protected
array<string|int, Swift_Transport>
$transports
= []
$deadTransports
Transports which are deemed useless.
private
array<string|int, Swift_Transport>
$deadTransports
= []
Methods
__construct()
Creates a new LoadBalancedTransport with $transports.
public
__construct([array<string|int, mixed> $transports = [] ]) : mixed
Parameters
- $transports : array<string|int, mixed> = []
Return values
mixed —getLastUsedTransport()
Get the Transport used in the last successful send operation.
public
getLastUsedTransport() : Swift_Transport
Return values
Swift_Transport —getTransports()
Get $transports to delegate to.
public
getTransports() : array<string|int, Swift_Transport>
Return values
array<string|int, Swift_Transport> —isStarted()
Test if this Transport mechanism has started.
public
isStarted() : bool
Return values
bool —ping()
Check if this Transport mechanism is alive.
public
ping() : bool
Return values
bool —TRUE if the transport is alive
registerPlugin()
Register a plugin.
public
registerPlugin(Swift_Events_EventListener $plugin) : mixed
Parameters
- $plugin : Swift_Events_EventListener
Return values
mixed —send()
Send the given Message.
public
send(Swift_Mime_SimpleMessage $message[, array<string|int, string> &$failedRecipients = null ]) : int
Recipient/sender data will be retrieved from the Message API. The return value is the number of recipients who were accepted for delivery.
Parameters
- $message : Swift_Mime_SimpleMessage
- $failedRecipients : array<string|int, string> = null
-
An array of failures by-reference
Return values
int —setTransports()
Set $transports to delegate to.
public
setTransports(array<string|int, Swift_Transport> $transports) : mixed
Parameters
- $transports : array<string|int, Swift_Transport>
Return values
mixed —start()
Start this Transport mechanism.
public
start() : mixed
Return values
mixed —stop()
Stop this Transport mechanism.
public
stop() : mixed
Return values
mixed —getNextTransport()
Rotates the transport list around and returns the first instance.
protected
getNextTransport() : Swift_Transport
Return values
Swift_Transport —killCurrentTransport()
Tag the currently used (top of stack) transport as dead/useless.
protected
killCurrentTransport() : mixed