XOOPS RMCommon Utilities  2.1.8.91RC
 All Classes Namespaces Files Functions Variables
Swift_Plugins_BandwidthMonitorPlugin Class Reference
Inheritance diagram for Swift_Plugins_BandwidthMonitorPlugin:
Inheritance graph

Public Member Functions

 beforeSendPerformed (Swift_Events_SendEvent $evt)
 
 bind (Swift_InputByteStream $is)
 
 commandSent (Swift_Events_CommandEvent $evt)
 
 commit ()
 
 flushBuffers ()
 
 getBytesIn ()
 
 getBytesOut ()
 
 reset ()
 
 responseReceived (Swift_Events_ResponseEvent $evt)
 
 sendPerformed (Swift_Events_SendEvent $evt)
 
 unbind (Swift_InputByteStream $is)
 
 write ($bytes)
 

Private Attributes

 $_in = 0
 
 $_mirrors = array()
 
 $_out = 0
 

Detailed Description

Definition at line 25 of file BandwidthMonitorPlugin.php.

Member Function Documentation

Swift_Plugins_BandwidthMonitorPlugin::beforeSendPerformed ( Swift_Events_SendEvent  $evt)

Not used.

Implements Swift_Events_SendListener.

Definition at line 50 of file BandwidthMonitorPlugin.php.

Swift_Plugins_BandwidthMonitorPlugin::bind ( Swift_InputByteStream  $is)

Attach $is to this stream. The stream acts as an observer, receiving all data that is written. All write() and flushBuffers() operations will be mirrored.

Parameters
Swift_InputByteStream$is

Implements Swift_InputByteStream.

Definition at line 111 of file BandwidthMonitorPlugin.php.

Swift_Plugins_BandwidthMonitorPlugin::commandSent ( Swift_Events_CommandEvent  $evt)

Invoked immediately following a command being sent.

Parameters
Swift_Events_ResponseEvent$evt

Implements Swift_Events_CommandListener.

Definition at line 68 of file BandwidthMonitorPlugin.php.

References Swift_Events_CommandEvent\getCommand().

Here is the call graph for this function:

Swift_Plugins_BandwidthMonitorPlugin::commit ( )

Not used.

Implements Swift_InputByteStream.

Definition at line 100 of file BandwidthMonitorPlugin.php.

Swift_Plugins_BandwidthMonitorPlugin::flushBuffers ( )

Not used.

Implements Swift_InputByteStream.

Definition at line 138 of file BandwidthMonitorPlugin.php.

Swift_Plugins_BandwidthMonitorPlugin::getBytesIn ( )

Get the total number of bytes received from the server.

Returns
int

Definition at line 159 of file BandwidthMonitorPlugin.php.

References $_in.

Swift_Plugins_BandwidthMonitorPlugin::getBytesOut ( )

Get the total number of bytes sent to the server.

Returns
int

Definition at line 150 of file BandwidthMonitorPlugin.php.

References $_out.

Referenced by Swift_Plugins_ThrottlerPlugin\_throttleBytesPerMinute().

Here is the caller graph for this function:

Swift_Plugins_BandwidthMonitorPlugin::reset ( )

Reset the internal counters to zero.

Definition at line 167 of file BandwidthMonitorPlugin.php.

Swift_Plugins_BandwidthMonitorPlugin::responseReceived ( Swift_Events_ResponseEvent  $evt)

Invoked immediately following a response coming back.

Parameters
Swift_Events_ResponseEvent$evt

Implements Swift_Events_ResponseListener.

Definition at line 78 of file BandwidthMonitorPlugin.php.

References Swift_Events_ResponseEvent\getResponse().

Here is the call graph for this function:

Swift_Plugins_BandwidthMonitorPlugin::sendPerformed ( Swift_Events_SendEvent  $evt)

Invoked immediately after the Message is sent.

Parameters
Swift_Events_SendEvent$evt

Implements Swift_Events_SendListener.

Definition at line 58 of file BandwidthMonitorPlugin.php.

References Swift_Events_SendEvent\getMessage().

Here is the call graph for this function:

Swift_Plugins_BandwidthMonitorPlugin::unbind ( Swift_InputByteStream  $is)

Remove an already bound stream. If $is is not bound, no errors will be raised. If the stream currently has any buffered data it will be written to $is before unbinding occurs.

Parameters
Swift_InputByteStream$is

Implements Swift_InputByteStream.

Definition at line 124 of file BandwidthMonitorPlugin.php.

Swift_Plugins_BandwidthMonitorPlugin::write (   $bytes)

Called when a message is sent so that the outgoing counter can be increased.

Parameters
string$bytes

Implements Swift_InputByteStream.

Definition at line 88 of file BandwidthMonitorPlugin.php.

Member Data Documentation

Swift_Plugins_BandwidthMonitorPlugin::$_in = 0
private

Definition at line 42 of file BandwidthMonitorPlugin.php.

Referenced by getBytesIn().

Swift_Plugins_BandwidthMonitorPlugin::$_mirrors = array()
private

Bound byte streams

Definition at line 45 of file BandwidthMonitorPlugin.php.

Swift_Plugins_BandwidthMonitorPlugin::$_out = 0
private

Definition at line 35 of file BandwidthMonitorPlugin.php.

Referenced by getBytesOut().


The documentation for this class was generated from the following file: