public interface ResourceOptimizationCapable
T-Plan Robot Enterprise, (C) 2009-2025 T-Plan Limited. All rights reserved.
Modifier and Type | Method and Description |
---|---|
BufferedImage |
getImage(Rectangle bounds,
long maxAgeMs,
boolean cachedOnly)
Get a current or recently created desktop image or its part.
|
long |
getLastImageRetrieveDurationMs()
Get duration of the last image retrieval.
|
boolean |
isGetImagePerformanceIntensive()
Indicates whether image retrieval is resource/performance intensive and
should be optimized by low priority processes such as for example report
generators etc.
|
boolean |
isResourceIntensiveOperationInProgress()
Indicates whether a resource intensive operation is in progress.
|
void |
setIntensiveOperationInProgress(boolean inProgress,
String source)
Notify the client that a resource intensive operation is about to start
or finish.
|
BufferedImage getImage(Rectangle bounds, long maxAgeMs, boolean cachedOnly)
bounds
- the image bounds or null to get the full screen image.maxAgeMs
- maximum age of the eventual cached image.cachedOnly
- use true to return the cached image only or null if it
is not available. The value of false will force creation of a new image
if there's no cached one.boolean isGetImagePerformanceIntensive()
long getLastImageRetrieveDurationMs()
void setIntensiveOperationInProgress(boolean inProgress, String source)
isResourceIntensiveOperationInProgress()
and avoid other
resource intensive tasks while an operation is in progress.inProgress
- true/false to indicate that an image intensive
operation is about to start/finish.source
- optional source or reason. It is only used for debugging of
who set the mode.boolean isResourceIntensiveOperationInProgress()
setIntensiveOperationInProgress(boolean, String)
for details.