public class WaitingIElementsProcessingResultHandler extends java.lang.Object implements IElementsProcessingResultHandler
Constructor and Description |
---|
WaitingIElementsProcessingResultHandler()
Initialize the new instance with default timeout of 10 seconds.
|
WaitingIElementsProcessingResultHandler(long timeoutInMs)
Initialize the new instance with a timeout.
|
Modifier and Type | Method and Description |
---|---|
protected org.pfsw.tools.cda.base.util.CollectionUtil |
coll() |
org.pfsw.tools.cda.base.model.ClassInformation[] |
findDependantsOfClass(org.pfsw.tools.cda.base.model.ClassInformation classInformation,
java.lang.String taskId,
IProgressMonitor monitor,
boolean findAll)
Starts a separate thread that collects dependants of the given class.
|
org.pfsw.tools.cda.base.model.GenericClassContainer[] |
findDependantsOfContainer(org.pfsw.tools.cda.base.model.GenericClassContainer container,
java.lang.String taskId,
IProgressMonitor monitor,
boolean findAll)
Starts a separate thread that collects dependants of the given container.
|
org.pfsw.tools.cda.base.model.ClassPackage[] |
findDependantsOfPackage(org.pfsw.tools.cda.base.model.ClassPackage aPackage,
java.lang.String taskId,
IProgressMonitor monitor,
boolean findAll)
Starts a separate thread that collects dependants of the given package.
|
org.pfsw.tools.cda.base.model.ClassInformation[] |
findImplementorsOfInterface(org.pfsw.tools.cda.base.model.ClassInformation interfaceClass,
java.lang.String taskId,
IProgressMonitor monitor,
boolean directOnly)
Starts a separate thread that collects implementors of the given interface.
|
protected ProcessingResult |
getResult() |
void |
handleElementsProcessingCancellation(java.lang.String type,
org.pfsw.tools.cda.base.model.IAnalyzableElement startElement)
This method will be called by ClassesProcessingTask if the search
was cancelled during its processing.
|
void |
handleElementsProcessingResult(java.lang.String type,
org.pfsw.tools.cda.base.model.IAnalyzableElement startElement,
ProcessingResult<? extends org.pfsw.tools.cda.base.model.IAnalyzableElement> result)
This method will be called by ClassesProcessingTask after successfully
completed the processing.
|
protected boolean |
hasTimedOut(long duration) |
protected boolean |
isStillProcessing() |
protected org.pfsw.tools.cda.base.model.ClassInformation[] |
waitAndReturnClasses() |
protected void |
waitWhileProcessing() |
public WaitingIElementsProcessingResultHandler()
public WaitingIElementsProcessingResultHandler(long timeoutInMs)
public void handleElementsProcessingCancellation(java.lang.String type, org.pfsw.tools.cda.base.model.IAnalyzableElement startElement)
IElementsProcessingResultHandler
handleElementsProcessingCancellation
in interface IElementsProcessingResultHandler
type
- Specifies the type of processingstartElement
- The element on which the processing was startedpublic void handleElementsProcessingResult(java.lang.String type, org.pfsw.tools.cda.base.model.IAnalyzableElement startElement, ProcessingResult<? extends org.pfsw.tools.cda.base.model.IAnalyzableElement> result)
IElementsProcessingResultHandler
handleElementsProcessingResult
in interface IElementsProcessingResultHandler
type
- Specifies the type of processingstartElement
- The element on which the processing was started (must not be null).result
- The collection containing all found elements (must not be null).public org.pfsw.tools.cda.base.model.GenericClassContainer[] findDependantsOfContainer(org.pfsw.tools.cda.base.model.GenericClassContainer container, java.lang.String taskId, IProgressMonitor monitor, boolean findAll)
container
- The container for which to collect the dependant containers.taskId
- A unique identifier that allows the result handler to associate the result to the initiator.monitor
- An optional monitor that will be called during processing to allow display current progress (may be null).findAll
- Specifies whether all dependants (recursively) or only direct dependants should be collected.public org.pfsw.tools.cda.base.model.ClassPackage[] findDependantsOfPackage(org.pfsw.tools.cda.base.model.ClassPackage aPackage, java.lang.String taskId, IProgressMonitor monitor, boolean findAll)
aPackage
- The package for which to collect the dependant packages.taskId
- A unique identifier that allows the result handler to associate the result to the initiator.monitor
- An optional monitor that will be called during processing to allow display current progress (may be null).findAll
- Specifies whether all dependants (recursively) or only direct dependants should be collected.public org.pfsw.tools.cda.base.model.ClassInformation[] findDependantsOfClass(org.pfsw.tools.cda.base.model.ClassInformation classInformation, java.lang.String taskId, IProgressMonitor monitor, boolean findAll)
classInformation
- The class for which to collect the dependant classes.taskId
- A unique identifier that allows the result handler to associate the result to the initiator.monitor
- An optional monitor that will be called during processing to allow display current progress (may be null).findAll
- Specifies whether all dependants (recursively) or only direct dependants should be collected.public org.pfsw.tools.cda.base.model.ClassInformation[] findImplementorsOfInterface(org.pfsw.tools.cda.base.model.ClassInformation interfaceClass, java.lang.String taskId, IProgressMonitor monitor, boolean directOnly)
interfaceClass
- The interface for which to lookup the implementors.taskId
- A unique identifier that allows the result handler to associate the result to the initiator.monitor
- An optional monitor that will be called during processing to allow display current progress (may be null).directOnly
- Specifies whether only direct implementors all implementors (including all subclasses of direct implementors) should be collected.protected org.pfsw.tools.cda.base.model.ClassInformation[] waitAndReturnClasses()
protected void waitWhileProcessing()
protected boolean isStillProcessing()
protected boolean hasTimedOut(long duration)
protected ProcessingResult getResult()
protected org.pfsw.tools.cda.base.util.CollectionUtil coll()