Class AbstractUnArchiveWorker<T extends AbstractUnArchiveNode>
- java.lang.Object
-
- com.levigo.jadice.server.core.NodeWorker<T>
-
- com.levigo.jadice.server.core.StreamWorker<T>
-
- com.levigo.jadice.server.archive.worker.AbstractUnArchiveWorker<T>
-
- All Implemented Interfaces:
QualifiedLogEventReceiver
,WorkerController<T>
,Runnable
- Direct Known Subclasses:
UnRARWorker
,UnSevenZIPWorker
,UnTARWorker
,UnZIPWorker
public abstract class AbstractUnArchiveWorker<T extends AbstractUnArchiveNode> extends StreamWorker<T>
-
-
Constructor Summary
Constructors Constructor Description AbstractUnArchiveWorker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<ArchiveEntryFilter>
getFilters()
protected boolean
isAcceptedByFilters(String dir, String name, long size)
This method returnstrue
when a given file name/directory combination shall be extracted from an archive file format otherwisefalse
.void
setFilters(List<ArchiveEntryFilter> filters)
-
Methods inherited from class com.levigo.jadice.server.core.StreamWorker
accept, reject, work, work
-
Methods inherited from class com.levigo.jadice.server.core.NodeWorker
abort, abortNow, addInputBundle, addOutputBundle, doAbort, doAbortNow, error, error, error, fail, fail, fail, getController, getInputBundle, getInputBundles, getJob, getLimitSupport, getNode, getOutputBundle, getOutputBundles, getServerJob, getState, getStreamTransportFactory, getTransportSender, initialize, isAbortRequested, postWork, preWork, run, setDescriptor, setJob, toString, warn, warn, warn
-
-
-
-
Method Detail
-
isAcceptedByFilters
protected boolean isAcceptedByFilters(String dir, String name, long size)
This method returnstrue
when a given file name/directory combination shall be extracted from an archive file format otherwisefalse
. ArchiveEntryFilters decide if a file shall be excluded from the extraction process or not. If one Filter doesn't accept a given filename the file will be filtered out.- Parameters:
dir
- The archive entry's directory name.name
- The archive entry's file name.size
- The size of the given archive entry.- Returns:
- if the file is accepted and therefore extracted from the archive.
-
getFilters
public List<ArchiveEntryFilter> getFilters()
-
setFilters
public void setFilters(List<ArchiveEntryFilter> filters)
-
-