Class SynchronousTransportListener
java.lang.Object
javax.mail.event.TransportAdapter
org.apache.jmeter.protocol.smtp.sampler.protocol.SynchronousTransportListener
- All Implemented Interfaces:
EventListener
,javax.mail.event.TransportListener
public class SynchronousTransportListener
extends javax.mail.event.TransportAdapter
This class implements a listener for SMTP events and a monitor for all
threads sending mail. The main purpose is to synchronize the send action with
the end of communication with remote smtp server, so that sending time can be
measured.
-
Constructor Summary
ConstructorDescriptionCreates a new instance of SynchronousTransportListener -
Method Summary
Modifier and TypeMethodDescriptionvoid
attend()
Synchronized-methodvoid
finish()
Synchronized-methodvoid
messageDelivered
(javax.mail.event.TransportEvent e) void
messageNotDelivered
(javax.mail.event.TransportEvent e) void
messagePartiallyDelivered
(javax.mail.event.TransportEvent e)
-
Constructor Details
-
SynchronousTransportListener
public SynchronousTransportListener()Creates a new instance of SynchronousTransportListener
-
-
Method Details
-
messageDelivered
public void messageDelivered(javax.mail.event.TransportEvent e) - Specified by:
messageDelivered
in interfacejavax.mail.event.TransportListener
- Overrides:
messageDelivered
in classjavax.mail.event.TransportAdapter
-
messageNotDelivered
public void messageNotDelivered(javax.mail.event.TransportEvent e) - Specified by:
messageNotDelivered
in interfacejavax.mail.event.TransportListener
- Overrides:
messageNotDelivered
in classjavax.mail.event.TransportAdapter
-
messagePartiallyDelivered
public void messagePartiallyDelivered(javax.mail.event.TransportEvent e) - Specified by:
messagePartiallyDelivered
in interfacejavax.mail.event.TransportListener
- Overrides:
messagePartiallyDelivered
in classjavax.mail.event.TransportAdapter
-
attend
Synchronized-methodWaits until
finish()
was called and thus the end of the mail sending was signaled.- Throws:
InterruptedException
- when interrupted while waiting with the lock
-
finish
public void finish()Synchronized-method
-