|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opcfoundation.ua.transport.impl.AsyncResultImpl<T>
public class AsyncResultImpl<T>
AsyncResultImpl class.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.opcfoundation.ua.transport.AsyncResult |
|---|
AsyncResult.AsyncResultStatus |
| Constructor Summary | |
|---|---|
AsyncResultImpl()
Constructor for AsyncResultImpl. |
|
| Method Summary | |
|---|---|
ServiceResultException |
getError()
getError. |
T |
getResult()
Get result if available |
AsyncResult.AsyncResultStatus |
getStatus()
Get request status |
void |
setError(ServiceResultException error)
Set error, invokes any listener in executor thread. |
void |
setErrorSync(ServiceResultException error)
Set error, invokes any listener here and now. |
void |
setListener(ResultListener<T> listener)
Set a listener. |
void |
setResult(T result)
Set error, invokes any listener in excutor thread If result or error has already been set, this method does nothing. |
void |
setResultSync(T result)
setResultSync. |
void |
setSource(AsyncResult<T> source)
Links another result as a source of this result object |
T |
waitForResult()
Wait for result until result is available. |
T |
waitForResult(long timeout,
TimeUnit unit)
Wait for result or time out. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AsyncResultImpl()
Constructor for AsyncResultImpl.
| Method Detail |
|---|
public ServiceResultException getError()
getError.
getError in interface AsyncResult<T>ServiceResultException object.public T getResult()
getResult in interface AsyncResult<T>public AsyncResult.AsyncResultStatus getStatus()
getStatus in interface AsyncResult<T>public void setError(ServiceResultException error)
error - a ServiceResultException object.
public void setErrorSync(ServiceResultException error)
throws RuntimeException
RuntimeException
error - a ServiceResultException object.
RuntimeException - if any.public void setListener(ResultListener<T> listener)
setListener in interface AsyncResult<T>listener - (listener may not block) or null to remove listenerpublic void setResult(T result)
result - a T object.
public void setResultSync(T result)
throws RuntimeException
setResultSync.
result - a T object.
RuntimeException - if any.public void setSource(AsyncResult<T> source)
source - a AsyncResult object.
public T waitForResult()
throws ServiceResultException
waitForResult in interface AsyncResult<T>ServiceResultException - network error, e.g. IOException of MethodNotSupportedException
public T waitForResult(long timeout,
TimeUnit unit)
throws ServiceResultException
waitForResult in interface AsyncResult<T>timeout - time out valueunit - time unit
ServiceResultException - error during invocation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||