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.
completionTimeout =
The number of seconds to wait for the child process to exit before reporting the delivery as a failure.
(type: int or float)
_timeoutCallID =
The call used to time out delivery, started when the connection to the child process is closed.
(type: None or IDelayedCall provider)
done =
A flag indicating whether the child process has exited (True) or not (False).
(type: bool)
reactor =
A reactor which will be used to schedule timeouts.
(type: IReactorTime provider)
protocol =
See __init__.
processName =
The process name.
(type: bytes or None)
completion =
The deferred which will be triggered by the protocol when the child process exits.
(type: Deferred)
def __init__(self, protocol, process=None, reactor=None): (source)
ParametersprotocolThe protocol associated with the child process. (type: ProcessAliasProtocol)
processThe process name. (type: bytes or None)
reactorA reactor which will be used to schedule timeouts. (type: None or IReactorTime provider)
def _processEnded(self, result): (source)

Record process termination and cancel the timeout call if it is active.

ParametersresultThe reason the child process terminated. (type: Failure)
ReturnsNone, if the process end is expected, or the reason the child process terminated, if the process end is unexpected. (type: None or Failure)
def lineReceived(self, line): (source)

Write a received line to the child process.

ParameterslineA received line of the message. (type: bytes)
def eomReceived(self): (source)

Disconnect from the child process and set up a timeout to wait for it to exit.

ReturnsA deferred which will be called back when the child process exits. (type: Deferred)
def _completionCancel(self): (source)

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.

def connectionLost(self): (source)

Ignore notification of lost connection.

def __str__(self): (source)

Build a string representation of this MessageWrapper instance.

ReturnsA string containing the name of the process. (type: bytes)
API Documentation for Twisted, generated by pydoctor at 2020-03-20 23:54:06.