Class Swift_Connection_Rotator

Description

Swift Rotator Connection

Switches through each connection in turn after sending each message

Located in /Swift/Connection/Rotator.php (line 20)

Swift_ConnectionBase
   |
   --Swift_Connection_Rotator
Method Summary
Swift_Connection_Rotator __construct ([ $connections = array()])
void addConnection ( $connection)
int getActive ()
void getAttributes ( $name)
void hasExtension ( $name)
boolean isAlive ()
void nextConnection ()
void postConnect ( $instance)
string read ()
void setExtension ( $extension, [ $attributes = array()])
void start ()
void stop ()
void write (string $command, [ $end = "\r\n"])
Methods
Constructor __construct (line 41)

Constructor

Swift_Connection_Rotator __construct ([ $connections = array()])
  • $connections
addConnection (line 52)

Add a connection to the list of options

void addConnection ( $connection)
  • Swift_Connection $connection: An instance of the connection
getActive (line 149)

Get the ID of the active connection

int getActive ()
getAttributes (line 179)

Call the current connection's getAttributes() method

void getAttributes ( $name)
  • $name

Redefinition of:
Swift_ConnectionBase::getAttributes()
Get the list of attributes supported by the given extension
hasExtension (line 172)

Call the current connection's hasExtension() method

void hasExtension ( $name)
  • $name

Redefinition of:
Swift_ConnectionBase::hasExtension()
Check if a given extension has been set as available
isAlive (line 141)

Check if the current connection is alive

boolean isAlive ()
nextConnection (line 60)

Rotate to the next working connection

  • throws: Swift_Connection_Exception If no connections are available
void nextConnection ()
postConnect (line 156)

Call the current connection's postConnect() method

void postConnect ( $instance)

Redefinition of:
Swift_ConnectionBase::postConnect()
Execute any needed logic after connecting and handshaking
read (line 96)

Read a full response from the buffer

  • throws: Swift_Connection_Exception Upon failure to read
string read ()
setExtension (line 165)

Call the current connection's setExtension() method

void setExtension ( $extension, [ $attributes = array()])
  • $extension
  • $attributes

Redefinition of:
Swift_ConnectionBase::setExtension()
Set an extension which the connection reports to support
start (line 121)

Try to start the connection

  • throws: Swift_Connection_Exception Upon failure to start
void start ()
stop (line 129)

Try to close the connection

  • throws: Swift_Connection_Exception Upon failure to close
void stop ()
write (line 109)

Write a command to the server (leave off trailing CRLF)

  • throws: swift_Connection_Exception Upon failure to write
void write (string $command, [ $end = "\r\n"])
  • string $command: The command to send
  • $end

Inherited Methods

Inherited From Swift_ConnectionBase

Swift_ConnectionBase::getAttributes()
Swift_ConnectionBase::hasExtension()
Swift_ConnectionBase::postConnect()
Swift_ConnectionBase::setExtension()

Documentation generated on Tue, 06 Mar 2007 23:32:27 +0000 by phpDocumentor 1.3.1