Package flumotion :: Package component :: Package common :: Package fgdp :: Module protocol :: Class FGDPBaseProtocol
[hide private]

Class FGDPBaseProtocol

source code

twisted.protocols.basic.LineReceiver --+
                                       |
             extern.log.log.Loggable --+
                                       |
                                      FGDPBaseProtocol

Base class for the twisted side of the FGDP protocol

Instance Methods [hide private]
 
__init__(self, gstElement) source code
 
startProtocol(self)
Subclasses must implement this method to start the protocol after a new connection has been made
source code
 
stopProtocol(self, reason)
Subclasses must implement this method to stop the protocol after the connection has been closed
source code
 
lineReceived(self, line)
Subclasess must implement this method to process the messages of the line-based protocol
source code
 
makeConnection(self, transport)
Store a reference of the trasport and file descriptor of the used by the new connection
source code
 
connectionMade(self) source code
 
connectionLost(self, reason) source code
 
loseConnection(self)
Loses the current connection and triggers the stop of the protocol.
source code
 
_makeHash(self, values) source code
 
_sendMessage(self, message, transport=None) source code
 
_disconnectFD(self, reason) source code
 
_delegateFD(self) source code

Inherited from extern.log.log.Loggable: __providedBy__, __provides__, debug, doLog, error, info, log, logFunction, logObjectName, warning, warningFailure, writeMarker

Class Variables [hide private]
  _transport = None
hash(x)
  _gstElement = None
hash(x)
  _fd = None
hash(x)
  _user = ''
  _password = ''

Inherited from extern.log.log.Loggable: __implemented__, logCategory

Method Details [hide private]

stopProtocol(self, reason)

source code 

Subclasses must implement this method to stop the protocol after the connection has been closed

Parameters:
  • reason (twsited.python.failure.Failure)

lineReceived(self, line)

source code 

Subclasess must implement this method to process the messages of the line-based protocol

Parameters:
  • line (str)

loseConnection(self)

source code 

Loses the current connection and triggers the stop of the protocol. Once the authentication has finished, the file descriptor is not handled anymore by the twisted reactor. A disconnection in the gstreamer element handling the file descriptor should call this method to notify the protocol about it.