class twisted.mail.alias.MessageWrapper: (source)
Implements interfaces: twisted.mail.interfaces.IMessageSMTP
A message receiver which delivers a message to a child process.
Instance Variable | completionTimeout | The number of seconds to wait for the child process to exit before reporting the delivery as a failure. |
Instance Variable | done | A flag indicating whether the child process has exited (True ) or not (False ). |
Instance Variable | reactor | A reactor which will be used to schedule timeouts. |
Instance Variable | protocol | See __init__ . |
Instance Variable | processName | The process name. |
Instance Variable | completion | The deferred which will be triggered by the protocol when the child process exits. |
Method | __init__ | |
Method | lineReceived | Write a received line to the child process. |
Method | eomReceived | Disconnect from the child process and set up a timeout to wait for it to exit. |
Method | connectionLost | Ignore notification of lost connection. |
Method | __str__ | Build a string representation of this MessageWrapper instance. |
Instance Variable | _timeoutCallID | The call used to time out delivery, started when the connection to the child process is closed. |
Method | _processEnded | Record process termination and cancel the timeout call if it is active. |
Method | _completionCancel | Handle the expiration of the timeout for the child process to exit by terminating the child process forcefully and issuing a failure to the completion deferred. |
None
or IDelayedCall
provider)
True
) or not (False
).bool
)
Deferred
)
Parameters | protocol | The protocol associated with the child process. (type: ProcessAliasProtocol ) |
process | The process name. (type: bytes or None ) | |
reactor | A reactor which will be used to schedule timeouts. (type: None or IReactorTime provider) |
Write a received line to the child process.
Parameters | line | A received line of the message. (type: bytes ) |
Disconnect from the child process and set up a timeout to wait for it to exit.
Returns | A deferred which will be called back when the child process exits. (type: Deferred ) |
Handle the expiration of the timeout for the child process to exit by terminating the child process forcefully and issuing a failure to the completion
deferred.
Build a string representation of this MessageWrapper
instance.
Returns | A string containing the name of the process. (type: bytes ) |