com.jivesoftware.base.search.task
Class InvocationResult
java.lang.Object
com.jivesoftware.base.search.task.InvocationResult
public class InvocationResult
- extends java.lang.Object
An InvocationResult is created when a task has finished to be executed in a remote JVM. This
class keeps a reference to the remote JVM that executed the task. This information might be
useful when future tasks are needed to be executed in the same remote JVM.
In case the task threw an error in the remote JVM then an instance of this class will also be
generated. However, when requesting getResult()
an exception will be thrown with the
error that was trapped in the remote JVM.
Method Summary |
commonj.work.WorkManager |
getPinnedWorkManager()
This returns a pinned WorkManager which represents the JVM that was used to execute
the requested task. |
java.lang.Object |
getResult()
Returns the result of the remote execution. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InvocationResult
public InvocationResult(commonj.work.RemoteWorkItem workItem)
getPinnedWorkManager
public commonj.work.WorkManager getPinnedWorkManager()
- This returns a pinned WorkManager which represents the JVM that was used to execute
the requested task. This allows subsequent remote Works to be sent to the same JVM as
the one that was used to execute the requested task.
- Returns:
- the WorkManager associated with the JVM that was used to execute the requested task.
getResult
public java.lang.Object getResult()
throws commonj.work.WorkException
- Returns the result of the remote execution. If an error occured while executing the task
in the remote JVM then an exception will be thrown.
- Returns:
- the result of the remote execution.
- Throws:
commonj.work.WorkException
- if an error occured while executing the task in the remote JVM.
Copyright © 1999-2006 Jive Software.