Swift
[ class tree: Swift ] [ index: Swift ] [ all elements ]

Class: Swift_Plugins_ThrottlerPlugin

Source Location: /vendors/swift/classes/Swift/Plugins/ThrottlerPlugin.php

Class Overview

Swift_Plugins_BandwidthMonitorPlugin
   |
   --Swift_Plugins_ThrottlerPlugin

Throttles the rate at which emails are sent.


Author(s):

  • Chris Corbyn

Implements interfaces:

Constants

Methods


Inherited Methods

Class: Swift_Plugins_BandwidthMonitorPlugin

Swift_Plugins_BandwidthMonitorPlugin::beforeSendPerformed()
Not used.
Swift_Plugins_BandwidthMonitorPlugin::bind()
Attach $is to this stream.
Swift_Plugins_BandwidthMonitorPlugin::commandSent()
Invoked immediately following a command being sent.
Swift_Plugins_BandwidthMonitorPlugin::commit()
Not used.
Swift_Plugins_BandwidthMonitorPlugin::flushBuffers()
Not used.
Swift_Plugins_BandwidthMonitorPlugin::getBytesIn()
Get the total number of bytes received from the server.
Swift_Plugins_BandwidthMonitorPlugin::getBytesOut()
Get the total number of bytes sent to the server.
Swift_Plugins_BandwidthMonitorPlugin::reset()
Reset the internal counters to zero.
Swift_Plugins_BandwidthMonitorPlugin::responseReceived()
Invoked immediately following a response coming back.
Swift_Plugins_BandwidthMonitorPlugin::sendPerformed()
Invoked immediately after the Message is sent.
Swift_Plugins_BandwidthMonitorPlugin::unbind()
Remove an already bound stream.
Swift_Plugins_BandwidthMonitorPlugin::write()
Called when a message is sent so that the outgoing counter can be increased.

Class Details

[line 22]
Throttles the rate at which emails are sent.



Tags:

author:  Chris Corbyn
filesource:  Source Code for this file


[ Top ]


Class Methods


constructor __construct [line 83]

Swift_Plugins_ThrottlerPlugin __construct( int $rate, [ $mode = self::BYTES_PER_MINUTE], [Swift_Plugins_Sleeper $sleeper = null], [Swift_Plugins_Timer $timer = null], int $mode,)

Create a new ThrottlerPlugin.



Tags:

access:  public


Parameters:

int   $rate  
int   $mode,   defaults to BYTES_PER_MINUTE
Swift_Plugins_Sleeper   $sleeper   (only needed in testing)
Swift_Plugins_Timer   $timer   (only needed in testing)
   $mode  

[ Top ]

method beforeSendPerformed [line 96]

void beforeSendPerformed( Swift_Events_SendEvent $evt)

Invoked immediately before the Message is sent.



Tags:

access:  public


Overrides Swift_Plugins_BandwidthMonitorPlugin::beforeSendPerformed() (Not used.)

Parameters:

Swift_Events_SendEvent   $evt  

[ Top ]

method getTimestamp [line 150]

int getTimestamp( )

Get the current UNIX timestamp



Tags:

access:  public



Implementation of:
Swift_Plugins_Timer::getTimestamp()
Get the current UNIX timestamp.
[ Top ]

method sendPerformed [line 124]

void sendPerformed( Swift_Events_SendEvent $evt)

Invoked when a Message is sent.



Tags:

access:  public


Overrides Swift_Plugins_BandwidthMonitorPlugin::sendPerformed() (Invoked immediately after the Message is sent.)

Parameters:

Swift_Events_SendEvent   $evt  

[ Top ]

method sleep [line 134]

void sleep( int $seconds)

Sleep for $seconds.



Tags:

access:  public



Implementation of:
Swift_Plugins_Sleeper::sleep()
Sleep for $seconds.

Parameters:

int   $seconds  

[ Top ]


Class Constants

BYTES_PER_MINUTE =  0x01

[line 28]

Flag for throttling in bytes per minute


[ Top ]

MESSAGES_PER_MINUTE =  0x10

[line 31]

Flag for throttling in emails per minute


[ Top ]



Documentation generated on Mon, 05 Sep 2011 20:34:45 -0500 by phpDocumentor 1.4.3