01: /*
02: * $Id: CallSucceededEvent.java,v 1.11 2007/09/18 08:45:07 agoubard Exp $
03: *
04: * Copyright 2003-2007 Orange Nederland Breedband B.V.
05: * See the COPYRIGHT file for redistribution and use restrictions.
06: */
07: package org.xins.client.async;
08:
09: import org.xins.client.AbstractCAPI;
10: import org.xins.client.AbstractCAPICallRequest;
11: import org.xins.client.AbstractCAPICallResult;
12:
13: /**
14: * Event fired when the call is finished and a succeeded result is returned
15: * from the call to the function.
16: *
17: * @version $Revision: 1.11 $ $Date: 2007/09/18 08:45:07 $
18: * @author <a href="mailto:anthony.goubard@japplis.com">Anthony Goubard</a>
19: *
20: * @since XINS 1.4.0
21: */
22: public final class CallSucceededEvent extends CallEvent {
23:
24: /**
25: * The successful result returned by the function.
26: */
27: private AbstractCAPICallResult _result;
28:
29: /**
30: * Creates a successful call event.
31: *
32: * @param capi
33: * the CAPI used to call the function. The CAPI is used as the event source.
34: *
35: * @param request
36: * the request of the call to the function.
37: *
38: * @param duration
39: * the duration of the call.
40: *
41: * @param result
42: * the result of the call.
43: */
44: public CallSucceededEvent(AbstractCAPI capi,
45: AbstractCAPICallRequest request, long duration,
46: AbstractCAPICallResult result) {
47:
48: super (capi, request, duration);
49: _result = result;
50: }
51:
52: /**
53: * Gets the result returned by the function. You may want then to cast the
54: * {@link org.xins.client.AbstractCAPICallResult AbstractCAPICallResult}
55: * to the generated result file normally returned by the CAPI call.
56: *
57: * @return
58: * the successful result returned by the function.
59: */
60: public AbstractCAPICallResult getResult() {
61: return _result;
62: }
63: }
|