public class AsyncResultI extends java.lang.Object implements AsyncResult
| Modifier and Type | Field and Description |
|---|---|
protected Connection |
_cachedConnection |
protected Instance |
_instance |
protected InvocationObserver |
_observer |
protected boolean |
_sentSynchronously |
protected byte |
_state |
protected static byte |
StateCachedBuffers |
protected static byte |
StateDone |
protected static byte |
StateEndCalled |
protected static byte |
StateOK |
protected static byte |
StateSent |
| Modifier | Constructor and Description |
|---|---|
protected |
AsyncResultI(Communicator communicator,
Instance instance,
java.lang.String op,
CallbackBase del) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
__wait() |
void |
cacheMessageBuffers() |
void |
cancel()
If not completed, cancels the request.
|
protected void |
cancel(LocalException ex) |
void |
cancelable(CancellationHandler handler) |
protected static void |
check(AsyncResult r,
java.lang.String operation) |
protected boolean |
finished(boolean ok) |
protected boolean |
finished(Exception ex) |
Communicator |
getCommunicator()
Returns the communicator that sent the invocation.
|
Connection |
getConnection()
Returns the connection that was used to call the
begin_ method, or nil
if this AsyncResult object was not obtained via an asynchronous connection invocation
(such as begin_flushBatchRequests). |
protected InvocationObserver |
getObserver() |
java.lang.String |
getOperation()
Returns the name of the operation.
|
ObjectPrx |
getProxy()
Returns the proxy that was used to call the
begin_ method, or nil
if this AsyncResult object was not obtained via an asynchronous proxy invocation. |
void |
invokeCompleted() |
void |
invokeCompletedAsync() |
void |
invokeSent() |
protected void |
invokeSentAsync() |
boolean |
isCompleted()
Indicates whether the result of an invocation is available.
|
boolean |
isSent()
When you call the
begin_ method, the Ice run time attempts to
write the corresponding request to the client-side transport. |
protected boolean |
sent(boolean done) |
boolean |
sentSynchronously()
This method returns true if a request was written to the client-side
transport without first being queued.
|
void |
throwLocalException()
If the invocation failed with a local exception, throws the local exception.
|
void |
waitForCompleted()
Blocks the caller until the result of the invocation is available.
|
void |
waitForSent()
Blocks the caller until the request has been written to the client-side transport.
|
protected final Instance _instance
protected InvocationObserver _observer
protected Connection _cachedConnection
protected boolean _sentSynchronously
protected static final byte StateOK
protected static final byte StateDone
protected static final byte StateSent
protected static final byte StateEndCalled
protected static final byte StateCachedBuffers
protected byte _state
protected AsyncResultI(Communicator communicator, Instance instance, java.lang.String op, CallbackBase del)
public void cancel()
AsyncResultcancel prevents a queued request from
being sent or ignores a reply if the request has already
been sent.cancel in interface AsyncResultpublic Communicator getCommunicator()
AsyncResultgetCommunicator in interface AsyncResultpublic Connection getConnection()
AsyncResultbegin_ method, or nil
if this AsyncResult object was not obtained via an asynchronous connection invocation
(such as begin_flushBatchRequests).getConnection in interface AsyncResultpublic ObjectPrx getProxy()
AsyncResultbegin_ method, or nil
if this AsyncResult object was not obtained via an asynchronous proxy invocation.getProxy in interface AsyncResultpublic final boolean isCompleted()
AsyncResultisCompleted in interface AsyncResultend_
method will not block. The method returns false if the result is not yet available.public final void waitForCompleted()
AsyncResultwaitForCompleted in interface AsyncResultpublic final boolean isSent()
AsyncResultbegin_ method, the Ice run time attempts to
write the corresponding request to the client-side transport. If the
transport cannot accept the request, the Ice run time queues the request
for later transmission. This method returns true if, at the time it is called,
the request has been written to the local transport (whether it was initially
queued or not). Otherwise, if the request is still queued, this method returns
false.isSent in interface AsyncResultpublic final void waitForSent()
AsyncResultwaitForSent in interface AsyncResultpublic final void throwLocalException()
AsyncResultthrowLocalException in interface AsyncResultpublic final boolean sentSynchronously()
AsyncResultsentSynchronously in interface AsyncResultpublic final java.lang.String getOperation()
AsyncResultgetOperation in interface AsyncResultpublic final void invokeSent()
public final void invokeCompleted()
public final void invokeCompletedAsync()
public void cancelable(CancellationHandler handler)
public final boolean __wait()
public void cacheMessageBuffers()
protected boolean sent(boolean done)
protected boolean finished(boolean ok)
protected boolean finished(Exception ex)
protected final void invokeSentAsync()
protected void cancel(LocalException ex)
protected InvocationObserver getObserver()
protected static void check(AsyncResult r, java.lang.String operation)