Package com.storedobject.core
Class StreamContentProducer
java.lang.Object
com.storedobject.core.StreamContentProducer
- All Implemented Interfaces:
Executable,ContentProducer,ContentType,RequiresTransactionManager,Closeable,AutoCloseable,Runnable
- Direct Known Subclasses:
AbstractSpreadSheet,ImageProducer,TextContentProducer
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidThis method may be called when the content generation is aborted due to some error.voidclose()abstract voidGenerate the content here and write to 'out'final EntitygetError()Get the current error (set viaContentProducer.abort(Throwable)).final ReportFormatRetrieves the transaction manager associated with this object.protected Writerstatic booleanisBlocked(ContentProducer contentProducer, String type) final booleanvoidproduce()Produce the content.voidready()voidSets the transaction manager for this object.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.storedobject.core.ContentProducer
execute, extractContent, getFileExtension, getStreamData, getStreamDataProvider, getSystemEntity, saveTo, saveTo, saveTo, saveToMethods inherited from interface com.storedobject.core.ContentType
getContentType, getLink, getMimeType, isAudio, isHTML, isImage, isLink, isMedia, isPDF, isText, isVideoMethods inherited from interface com.storedobject.common.Executable
act, run
-
Field Details
-
out
-
entity
-
-
Constructor Details
-
StreamContentProducer
public StreamContentProducer() -
StreamContentProducer
-
-
Method Details
-
produce
public void produce()Description copied from interface:ContentProducerProduce the content.- Specified by:
producein interfaceContentProducer
-
ready
public void ready()- Specified by:
readyin interfaceContentProducer
-
getFileName
- Specified by:
getFileNamein interfaceContentProducer
-
generateContent
-
getContent
- Specified by:
getContentin interfaceContentProducer
-
setTransactionManager
Description copied from interface:RequiresTransactionManagerSets the transaction manager for this object. The transaction manager is responsible for managing transaction boundaries.- Specified by:
setTransactionManagerin interfaceRequiresTransactionManager- Parameters:
tm- the transaction manager to be set
-
getTransactionManager
Description copied from interface:RequiresTransactionManagerRetrieves the transaction manager associated with this object.- Specified by:
getTransactionManagerin interfaceContentProducer- Specified by:
getTransactionManagerin interfaceRequiresTransactionManager- Returns:
- the transaction manager responsible for managing transaction boundaries
-
getWriter
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
abort
Description copied from interface:ContentProducerThis method may be called when the content generation is aborted due to some error.Note: This could be invoked multiple times.
- Specified by:
abortin interfaceContentProducer- Parameters:
error- Error.
-
getError
Description copied from interface:ContentProducerGet the current error (set viaContentProducer.abort(Throwable)).- Specified by:
getErrorin interfaceContentProducer- Returns:
- Current error if any.
-
getReportFormat
-
getEntity
- Specified by:
getEntityin interfaceContentProducer
-
isBlocked
-
isBlocked
-