Class Swift_Plugins_AntiFloodPlugin

InheritanceSwift_Plugins_AntiFloodPlugin
ImplementsSwift_Events_SendListener, Swift_Plugins_Sleeper

Reduces network flooding when sending large amounts of mail.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__construct() Create a new AntiFloodPlugin with $threshold and $sleep time. Swift_Plugins_AntiFloodPlugin
beforeSendPerformed() Invoked immediately before the Message is sent. Swift_Plugins_AntiFloodPlugin
getSleepTime() Get the number of seconds to sleep for during a restart. Swift_Plugins_AntiFloodPlugin
getThreshold() Get the number of emails to send before restarting. Swift_Plugins_AntiFloodPlugin
sendPerformed() Invoked immediately after the Message is sent. Swift_Plugins_AntiFloodPlugin
setSleepTime() Set the number of seconds to sleep for during a restart. Swift_Plugins_AntiFloodPlugin
setThreshold() Set the number of emails to send before restarting. Swift_Plugins_AntiFloodPlugin
sleep() Sleep for $seconds. Swift_Plugins_AntiFloodPlugin

Method Details

__construct() public method

Create a new AntiFloodPlugin with $threshold and $sleep time.

public void __construct ( $threshold 99, $sleep 0, Swift_Plugins_Sleeper $sleeper null )
$threshold int
$sleep int

Time

$sleeper Swift_Plugins_Sleeper

(not needed really)

beforeSendPerformed() public method

Invoked immediately before the Message is sent.

public void beforeSendPerformed ( Swift_Events_SendEvent $evt )
$evt Swift_Events_SendEvent
getSleepTime() public method

Get the number of seconds to sleep for during a restart.

public int getSleepTime ( )
getThreshold() public method

Get the number of emails to send before restarting.

public int getThreshold ( )
sendPerformed() public method

Invoked immediately after the Message is sent.

public void sendPerformed ( Swift_Events_SendEvent $evt )
$evt Swift_Events_SendEvent
setSleepTime() public method

Set the number of seconds to sleep for during a restart.

public void setSleepTime ( $sleep )
$sleep int

Time

setThreshold() public method

Set the number of emails to send before restarting.

public void setThreshold ( $threshold )
$threshold int
sleep() public method

Sleep for $seconds.

public void sleep ( $seconds )
$seconds int