public class FileProcessorManager extends ChannelListener implements JPropertiesListener
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
REVISION |
order| Modifier and Type | Method and Description |
|---|---|
void |
add(ProcessingData data)
Add ProcessingData in the queue for a futur processing
|
void |
addRunningDataFromScan(java.lang.String repositoryId)
Tell the manager that a scan of a repository is currently beginning and no
other scan of the same repository should be done until the first has been totally processed.
|
static FileProcessorManager |
getInstance() |
ProcessingData |
getLastAddedProcessingData()
Retrieve the last ProcessingData instance that WAS processed (ie for which process may still be pending, in progress or completely finished).
|
ProcessingData |
getLastFinishedProcessingData()
Retrieve the last ProcessingData instance that WAS processed (ie for which process is finished).
|
ProcessingData |
getProcessingData()
Retrieve the next ProcessingData to processe, wait until one
is added if none is yet available.
|
java.util.List<ProcessingData> |
getProcessingDataQueueCopy()
Retrieve a copy of the Processing queue containing all
ProcessingData yet to be processed
|
void |
handleFinalize()
Called when the channel is finalized
|
void |
init() |
void |
initAfterStoreLoad()
Called just after the store has been loaded and
the channel has been initialized.
|
void |
initBeforeStoreLoad()
Called just before the store has been loaded.
|
static boolean |
isEnabled()
Check if the File Processor is enabled.
|
boolean |
isProcessingThreadAlive()
Tell if the processing of files is alive (which is expected at all time after JCMS startup, even if FileProcessor is disabled, otherwise a complete restart is required).
|
boolean |
isProcessingThreadRunning()
Tell if the processing of files is running (Otherwise, it is stopped, or waiting).
|
boolean |
isRunnningDataFromScan(java.lang.String repositoryId)
Indicates if the processing thread currently process a set of data sent by a scan of the
repository directory.
|
void |
propertiesChange(JProperties properties)
Invoked after properties have been modified in JCMS and save on disk.
|
boolean |
queueContains(Repository repository,
FileActionComponent.Operation operation,
java.io.File file)
Check if the queue contains a ProcessingData matching the specified parameters.
|
compareTo, equals, initpublic static final java.lang.String REVISION
public static FileProcessorManager getInstance()
public void init()
public void propertiesChange(JProperties properties)
JPropertiesListenerYou cannot alter the value received in parameters.
propertiesChange in interface JPropertiesListenerproperties - the properties which have been modified (may not contain all JCMS properties)public void initBeforeStoreLoad()
throws java.lang.Exception
ChannelListenerinitBeforeStoreLoad in class ChannelListenerjava.lang.Exception - any exception you may want to throw if a problem occurs needing to interrupt JCMS startup.public void initAfterStoreLoad()
throws java.lang.Exception
ChannelListenerinitAfterStoreLoad in class ChannelListenerjava.lang.Exception - any exception you may want to throw if a problem occurs needing to interrupt JCMS startup.public void handleFinalize()
ChannelListenerhandleFinalize in class ChannelListenerpublic static boolean isEnabled()
public boolean isProcessingThreadRunning()
public boolean isProcessingThreadAlive()
public boolean isRunnningDataFromScan(java.lang.String repositoryId)
repositoryId - The id of the given repositorypublic void addRunningDataFromScan(java.lang.String repositoryId)
repositoryId - the id of the given repositorypublic ProcessingData getLastFinishedProcessingData()
public ProcessingData getLastAddedProcessingData()
public void add(ProcessingData data)
data - the ProcessingData to be processedpublic ProcessingData getProcessingData() throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic java.util.List<ProcessingData> getProcessingDataQueueCopy()
public boolean queueContains(Repository repository, FileActionComponent.Operation operation, java.io.File file)
repository - a repository that must be matched by the ProcessingData to look for, may be null if at least one of the other parameters is not nulloperation - an Operation that must be matched by the ProcessingData to look for, may be null if at least one of the other parameters is not nullfile - a File that must be found in the file set of the ProcessingData to look for, may be null if at least one of the other parameters is not nulljava.lang.IllegalArgumentException - if no valid parameters were specifiedCopyright © 2001-2019 Jalios SA. All Rights Reserved.