org.xins.client.async
Class CallSucceededEvent

java.lang.Object
  extended byjava.util.EventObject
      extended byorg.xins.client.async.CallEvent
          extended byorg.xins.client.async.CallSucceededEvent
All Implemented Interfaces:
Serializable

public final class CallSucceededEvent
extends org.xins.client.async.CallEvent

Event fired when the call is finished and a succeeded result is returned from the call to the function.

Since:
XINS 1.4.0
Version:
$Revision: 1.6 $ $Date: 2006/10/24 11:12:33 $
Author:
Anthony Goubard
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
CallSucceededEvent(AbstractCAPI capi, AbstractCAPICallRequest request, long duration, AbstractCAPICallResult result)
          Creates a successful call event.
 
Method Summary
 long getDuration()
          Gets the time it took to call the function.
 AbstractCAPICallRequest getRequest()
          The request of the call.
 AbstractCAPICallResult getResult()
          Gets the result returned by the function.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CallSucceededEvent

public CallSucceededEvent(AbstractCAPI capi,
                          AbstractCAPICallRequest request,
                          long duration,
                          AbstractCAPICallResult result)
Creates a successful call event.

Parameters:
capi - the CAPI used to call the function. The CAPI is used as the event source.
request - the request of the call to the function.
duration - the duration of the call.
result - the result of the call.
Method Detail

getResult

public AbstractCAPICallResult getResult()
Gets the result returned by the function. You may want then to cast the AbstractCAPICallResult to the generated result file normally returned by the CAPI call.

Returns:
the successful result returned by the function.

getDuration

public long getDuration()
Gets the time it took to call the function.

Returns:
the duration of the call in milliseconds.

getRequest

public AbstractCAPICallRequest getRequest()
The request of the call.

Returns:
the request of the call to the function.


See http://www.xins.org/.