t.m.r.Queue : class documentation

Part of twisted.mail.relaymanager View Source View In Hierarchy

A queue for messages to be relayed.
Instance Variable directory See __init__
Instance Variable n A number used to form unique filenames. (type: int)
Instance Variable waiting The base filenames of messages waiting to be relayed. (type: dict of bytes)
Instance Variable relayed The base filenames of messages in the process of being relayed. (type: dict of bytes)
Instance Variable noisy A flag which determines whether informational log messages will be generated (True) or not (False). (type: bool)
Method __init__ Initialize non-volatile state.
Method __getstate__ Create a representation of the non-volatile state of the queue.
Method __setstate__ Restore the non-volatile state of the queue and recreate the volatile state.
Method readDirectory Scan the message directory for new messages.
Method getWaiting Return the base filenames of messages waiting to be relayed.
Method hasWaiting Return an indication of whether the queue has messages waiting to be relayed.
Method getRelayed Return the base filenames of messages in the process of being relayed.
Method setRelaying Mark a message as being relayed.
Method setWaiting Mark a message as waiting to be relayed.
Method addMessage Mark a message as waiting to be relayed unless it is in the process of being relayed.
Method done Remove a message from the queue.
Method getPath Return the full base pathname of a message in the queue.
Method getEnvelope Get the envelope for a message.
Method getEnvelopeFile Return the envelope file for a message in the queue.
Method createNewMessage Create a new message in the queue.
Method _init Initialize volatile state.
directory =
See __init__
n =
A number used to form unique filenames. (type: int)
waiting =
The base filenames of messages waiting to be relayed. (type: dict of bytes)
relayed =
The base filenames of messages in the process of being relayed. (type: dict of bytes)
noisy =
A flag which determines whether informational log messages will be generated (True) or not (False). (type: bool)
def __init__(self, directory): (source)
Initialize non-volatile state.
ParametersdirectoryThe pathname of the directory holding messages in the queue. (type: bytes)
def _init(self): (source)
Initialize volatile state.
def __getstate__(self): (source)
Create a representation of the non-volatile state of the queue.
ReturnsThe non-volatile state of the queue. (type: dict mapping bytes to object)
def __setstate__(self, state): (source)
Restore the non-volatile state of the queue and recreate the volatile state.
ParametersstateThe non-volatile state of the queue. (type: dict mapping bytes to object)
def readDirectory(self): (source)
Scan the message directory for new messages.
def getWaiting(self): (source)
Return the base filenames of messages waiting to be relayed.
ReturnsThe base filenames of messages waiting to be relayed. (type: list of bytes)
def hasWaiting(self): (source)
Return an indication of whether the queue has messages waiting to be relayed.
ReturnsTrue if messages are waiting to be relayed. False otherwise. (type: bool)
def getRelayed(self): (source)
Return the base filenames of messages in the process of being relayed.
ReturnsThe base filenames of messages in the process of being relayed. (type: list of bytes)
def setRelaying(self, message): (source)
Mark a message as being relayed.
ParametersmessageThe base filename of a message. (type: bytes)
def setWaiting(self, message): (source)
Mark a message as waiting to be relayed.
ParametersmessageThe base filename of a message. (type: bytes)
def addMessage(self, message): (source)
Mark a message as waiting to be relayed unless it is in the process of being relayed.
ParametersmessageThe base filename of a message. (type: bytes)
def done(self, message): (source)
Remove a message from the queue.
ParametersmessageThe base filename of a message. (type: bytes)
def getPath(self, message): (source)
Return the full base pathname of a message in the queue.
ParametersmessageThe base filename of a message. (type: bytes)
ReturnsThe full base pathname of the message. (type: bytes)
def getEnvelope(self, message): (source)
Get the envelope for a message.
ParametersmessageThe base filename of a message. (type: bytes)
ReturnsA list containing the origination and destination addresses for the message. (type: list of two bytes)
def getEnvelopeFile(self, message): (source)
Return the envelope file for a message in the queue.
ParametersmessageThe base filename of a message. (type: bytes)
ReturnsThe envelope file for the message. (type: file)
def createNewMessage(self): (source)
Create a new message in the queue.
ReturnsThe envelope file and a message receiver for a new message in the queue. (type: 2-tuple of (0) file, (1) FileMessage)
API Documentation for Twisted, generated by pydoctor at 2014-09-17 19:15:55.