|
ShrinkWrap Aggregator and Build Parent 1.0.0-cr-1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.shrinkwrap.impl.base.exporter.AbstractExporterDelegate<InputStream>
org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase<O>
public abstract class StreamExporterDelegateBase<O extends OutputStream>
Base for exporters capable of writing to some implementation
of OutputStream
Field Summary | |
---|---|
protected CountDownLatch |
latch
Synchronization point where the encoding process will wait until all streams have been set up |
protected O |
outputStream
OutputStream used to write the individual entries |
Constructor Summary | |
---|---|
StreamExporterDelegateBase(Archive<?> archive)
Creates a new exporter delegate for exporting archives |
Method Summary | |
---|---|
protected abstract void |
closeEntry(O outputStream)
Closes the current entry context for the specified OutputStream |
protected abstract O |
createOutputStream(OutputStream out)
Creates the real OutputStream to which we'll write,
wrapping the provided target. |
protected void |
doExport()
Primary method providing a template for exporting the contents of an archive |
protected Set<ArchivePath> |
getExportedPaths()
Returns an immutable view of all ArchivePath s currently exported |
protected abstract Callable<Void> |
getExportTask(Callable<Void> wrappedTask)
Returns the task used to run the export operation in another Thread. |
protected InputStream |
getResult()
Return the results of the export. |
protected void |
processNode(ArchivePath path,
Node node)
Template method for processing a single node. |
protected abstract void |
putNextExtry(O outputStream,
String context)
Writes the next entry (demarcates a new file/folder is to be written) |
Methods inherited from class org.jboss.shrinkwrap.impl.base.exporter.AbstractExporterDelegate |
---|
export, getArchive |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected O extends OutputStream outputStream
OutputStream
used to write the individual entries
protected final CountDownLatch latch
Constructor Detail |
---|
public StreamExporterDelegateBase(Archive<?> archive) throws IllegalArgumentException
IllegalArgumentException
Method Detail |
---|
protected abstract Callable<Void> getExportTask(Callable<Void> wrappedTask)
wrappedTask
- The export task to be wrapped in more specific handling logicprotected void doExport()
doExport
in class AbstractExporterDelegate<InputStream>
AbstractExporterDelegate.doExport()
protected abstract void putNextExtry(O outputStream, String context) throws IOException
outputStream
- context
-
IOException
- If an error occurred writing the entryprotected abstract void closeEntry(O outputStream) throws IOException
OutputStream
outputStream
-
IOException
protected abstract O createOutputStream(OutputStream out) throws IOException
OutputStream
to which we'll write,
wrapping the provided target.
out
-
IOException
- If an error occurred in creating the streamprotected void processNode(ArchivePath path, Node node)
processNode
in class AbstractExporterDelegate<InputStream>
AbstractExporterDelegate.processNode(ArchivePath, Node)
protected InputStream getResult()
getResult
in class AbstractExporterDelegate<InputStream>
AbstractExporterDelegate.getResult()
protected final Set<ArchivePath> getExportedPaths()
ArchivePath
s currently exported
|
ShrinkWrap Aggregator and Build Parent 1.0.0-cr-1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |