org.apache.jmeter.protocol.smtp.sampler.protocol

## 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

    Constructors
    Constructor and Description
    `SynchronousTransportListener()` Creates a new instance of SynchronousTransportListener

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `attend()` Synchronized-method
    `void` | `finish()` Synchronized-method
    `void` | `messageDelivered(javax.mail.event.TransportEvent e)`
    `void` | `messageNotDelivered(javax.mail.event.TransportEvent e)`
    `void` | `messagePartiallyDelivered(javax.mail.event.TransportEvent e)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SynchronousTransportListener

          public SynchronousTransportListener()

      Creates a new instance of SynchronousTransportListener

  - ### Method Detail

    - #### messageDelivered

          public void messageDelivered(javax.mail.event.TransportEvent e)

      Specified by:
        `messageDelivered` in interface `javax.mail.event.TransportListener`
      Overrides:
        `messageDelivered` in class `javax.mail.event.TransportAdapter`

    - #### messageNotDelivered

          public void messageNotDelivered(javax.mail.event.TransportEvent e)

      Specified by:
        `messageNotDelivered` in interface `javax.mail.event.TransportListener`
      Overrides:
        `messageNotDelivered` in class `javax.mail.event.TransportAdapter`

    - #### messagePartiallyDelivered

          public void messagePartiallyDelivered(javax.mail.event.TransportEvent e)

      Specified by:
        `messagePartiallyDelivered` in interface `javax.mail.event.TransportListener`
      Overrides:
        `messagePartiallyDelivered` in class `javax.mail.event.TransportAdapter`

    - #### attend

          public void attend()
                      throws InterruptedException

      Synchronized-method

      Waits until `finish()` was called and thus the end of the mail sending was signalled.

      Throws:
        `InterruptedException` - when interrupted while waiting with the lock

    - #### finish

          public void finish()

      Synchronized-method

Copyright © 1998-2019 Apache Software Foundation. All Rights Reserved.