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

Class FGDPBaseProtocol

source code

twisted.internet.protocol.BaseProtocol --+        
                                         |        
        twisted.internet.protocol.Protocol --+    
                                             |    
   twisted.protocols.basic._PauseableMixin --+    
                                             |    
          twisted.protocols.basic.LineReceiver --+
                                                 |
                       extern.log.log.Loggable --+
                                                 |
                                                FGDPBaseProtocol
Known Subclasses:

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)
Called when a connection is made.
source code
 
connectionLost(self, reason)
Called when the connection is shut down.
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 twisted.protocols.basic.LineReceiver: clearLineBuffer, dataReceived, lineLengthExceeded, rawDataReceived, sendLine, setLineMode, setRawMode

Inherited from twisted.internet.protocol.Protocol: __provides__, logPrefix

Inherited from twisted.internet.protocol.BaseProtocol: __providedBy__

Inherited from twisted.protocols.basic._PauseableMixin: pauseProducing, resumeProducing, stopProducing

Inherited from extern.log.log.Loggable: 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 twisted.protocols.basic.LineReceiver: MAX_LENGTH, delimiter, line_mode

Inherited from twisted.protocols.basic.LineReceiver (private): _buffer, _busyReceiving

Inherited from twisted.internet.protocol.Protocol: __implemented__

Inherited from twisted.internet.protocol.BaseProtocol: connected, transport

Inherited from twisted.protocols.basic._PauseableMixin: paused

Inherited from extern.log.log.Loggable: 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) - The line which was received with the delimiter removed.
Overrides: twisted.protocols.basic.LineReceiver.lineReceived

makeConnection(self, transport)

source code 

Store a reference of the trasport and file descriptor of the used by the new connection

Overrides: twisted.internet.protocol.BaseProtocol.makeConnection

connectionMade(self)

source code 

Called when a connection is made.

This may be considered the initializer of the protocol, because it is called when the connection is completed. For clients, this is called once the connection to the server has been established; for servers, this is called after an accept() call stops blocking and a socket has been received. If you need to send any greeting or initial message, do it here.

Overrides: twisted.internet.protocol.BaseProtocol.connectionMade
(inherited documentation)

connectionLost(self, reason)

source code 

Called when the connection is shut down.

Clear any circular references here, and any external references to this Protocol. The connection has been closed.

Overrides: twisted.internet.protocol.Protocol.connectionLost
(inherited documentation)

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.