|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MimeBodyPartRecorder
Records the usage of images which are meant to be embedded in a MIME email.
Anytrack(javax.activation.DataSource)
call has to be done within the closure given to record(java.util.concurrent.Callable)
. Nested #record(java.util.concurrent.Callable)
should be
supported in the way that they start a new, isolated recording whilst remembering the outer tracking calls.
A MimeBodyPartRecorder
implementation has to be thread-safe but is not required to share its state
amongst threads. That is, even if a recorder instance is shared amongst threads, a track(javax.activation.DataSource)
call from a different thread than the one setting up the record(java.util.concurrent.Callable)
, will not necessarily be tracked.
Method Summary | ||
---|---|---|
boolean |
isRecording()
|
|
|
record(java.util.concurrent.Callable<T> callback)
Activate the recorder so that it can record track(javax.activation.DataSource) calls. |
|
com.atlassian.fugue.Maybe<MimeBodyPartReference> |
track(javax.activation.DataSource source)
Track the given image source. |
Method Detail |
---|
<T> com.atlassian.fugue.Pair<com.atlassian.fugue.Maybe<T>,java.lang.Iterable<MimeBodyPartReference>> record(java.util.concurrent.Callable<T> callback) throws java.lang.Exception
track(javax.activation.DataSource)
calls.
T
- the return type of the callbackcallback
- the code eligible for recording
java.lang.Exception
- if the callback escapesboolean isRecording()
com.atlassian.fugue.Maybe<MimeBodyPartReference> track(javax.activation.DataSource source)
source
- a DataSource
encapsulating the access to the image data
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |