Package org.jtrim2.ui.concurrent.query
Interface RenderingState
public interface RenderingState
Defines the state of an asynchronous rendering request. This result is
intended to be associated with a rendering request passed to an
AsyncRenderer.
Thread safety
Implementations of this interface are required to be safe to be accessed from multiple threads concurrently.Synchronization transparency
Implementations of this interface are not required to be synchronization transparent.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the state of asynchronous data retrieval process associated with the rendering.longgetRenderingTime(TimeUnit unit) Returns the time elapsed since the rendering started.booleanReturnstrueif the asynchronous rendering process has completed.
-
Method Details
-
isRenderingFinished
boolean isRenderingFinished()Returnstrueif the asynchronous rendering process has completed. When this object refers to aDataRendererthis implies that thefinishRenderingmethod of the associatedDataRendererhas already returned.- Returns:
trueif the asynchronous rendering process has completed,falseotherwise
-
getRenderingTime
Returns the time elapsed since the rendering started. The return value of this method is independent of the completion of the rendering request.- Parameters:
unit- the time unit in which the result is to be interpreted. This argument cannot benull.- Returns:
- the time in the specified time unit elapsed since the start of the associated rendering request
- Throws:
NullPointerException- thrown if the specified argument isnull
-
getAsyncDataState
AsyncDataState getAsyncDataState()Returns the state of asynchronous data retrieval process associated with the rendering. That is, this method returns the state returned by theAsyncDataLinkpassed toAsyncRenderer.render.- Returns:
- the state of asynchronous data retrieval process associated with
the rendering. This method may return
nullif the state is not available.
-