01: /*
02: * $Id: CallFailedEvent.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:
12: /**
13: * Event fired the call to the function failed.
14: *
15: * @version $Revision: 1.11 $ $Date: 2007/09/18 08:45:07 $
16: * @author <a href="mailto:anthony.goubard@japplis.com">Anthony Goubard</a>
17: *
18: * @since XINS 1.4.0
19: */
20: public final class CallFailedEvent extends CallEvent {
21:
22: /**
23: * The exception thrown by the call.
24: */
25: private Exception _exception;
26:
27: /**
28: * Creates a failed call event.
29: *
30: * @param capi
31: * the CAPI used to call the function. The CAPI is used as the event source.
32: *
33: * @param request
34: * the request of the call to the function.
35: *
36: * @param duration
37: * the duration of the call.
38: *
39: * @param exception
40: * the exception thrown by the CAPI call.
41: */
42: public CallFailedEvent(AbstractCAPI capi,
43: AbstractCAPICallRequest request, long duration,
44: Exception exception) {
45: super (capi, request, duration);
46: _exception = exception;
47: }
48:
49: /**
50: * Gets the exception thrown by the CAPI call.
51: *
52: * @return
53: * the exception, most probably a sub class of the
54: * {@link org.xins.common.service.CallException CallException}.
55: */
56: public Exception getException() {
57: return _exception;
58: }
59: }
|