Interface MimeBodyPartRecorder

    • Method Detail

      • startRecording

        default <T> io.atlassian.fugue.Pair<Optional<T>,​Iterable<MimeBodyPartReference>> startRecording​(Callable<T> callback)
                                                                                                       throws Exception
        Activate the recorder so that it can record trackSource(DataSource) calls.
        Type Parameters:
        T - the return type of the callback
        Parameters:
        callback - the code eligible for recording
        Returns:
        a pair of the result of the callback and the recorded references of the embeddable images
        Throws:
        Exception - if the callback escapes
        Since:
        7.0.1
      • isRecording

        boolean isRecording()
        Returns:
        true if the current thread is being recorded.
      • track

        @Deprecated
        com.atlassian.fugue.Maybe<MimeBodyPartReference> track​(javax.activation.DataSource source)
        Deprecated.
        since 7.0.1. Use trackSource(DataSource)
        Track the given image source.
        Parameters:
        source - a DataSource encapsulating the access to the image data
        Returns:
        maybe a reference to the given image, will be empty if the recorder is not recording
      • trackSource

        default Optional<MimeBodyPartReference> trackSource​(javax.activation.DataSource source)
        Track the given image source.
        Parameters:
        source - a DataSource encapsulating the access to the image data
        Returns:
        maybe a reference to the given image, will be empty if the recorder is not recording
        Since:
        7.0.1