make method return types in ResourceFactoryManagerRemote non-void?
Joseph Marques
jmarques at redhat.com
Thu Sep 16 22:15:15 UTC 2010
On 09/16/2010 04:29 PM, John Sanda wrote:
> ...
> If we pass back those
> history objects, then I can write some more intelligent scripts. I could
> make it appear that those operations are blocking while I poll (not
> indefinitely) for the history to get updated or I spin off a thread
> where I poll so that I can get the updated history asynchronously.
sounds reasonable to me. take a look at ResourceClientProxy for how the
operation invocation facade works. it invokes the operation, gets the
resultant ResourceOperationHistory element, then spins while waiting for
the operation to move to some terminal state (SUCCESS or FAILED), or
breaks if the operation hasn't completed in a few seconds (so as not to
wait indefinitely). the proxy object is the preferred way of
implementing more intuitive semantics for interacting with resources by
wrapping and/or chaining together the building block methods exposed via
the remote API.
More information about the rhq-devel
mailing list