Package org.opencms.gwt.client.util
Class CmsAsyncJoinHandler
java.lang.Object
org.opencms.gwt.client.util.CmsAsyncJoinHandler
Helper class used to perform an action when multiple asynchronous tasks have finished.
To use this, first, for every action, add a token which uniquely identifies the action. Remove the corresponding token when the action is finished. When all tokens are removed, the final action will be executed.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds tokens.void
removeToken
(Object token) Removes a token.
-
Field Details
-
m_tokens
The set of tokens.
-
-
Constructor Details
-
CmsAsyncJoinHandler
Creates a new instance.- Parameters:
joinAction
- the final action to execute
-
-
Method Details
-
addTokens
Adds tokens.- Parameters:
tokens
- the tokens to add
-
removeToken
Removes a token.When all tokens have been removed, the final action is executed.
- Parameters:
token
- the token to remove
-