01: /*
02: * $Id: UnexpectedExceptionCallException.java,v 1.20 2007/05/15 12:28:56 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.common.service;
08:
09: import org.xins.common.MandatoryArgumentChecker;
10:
11: /**
12: * Exception that indicates an unexpected exception was caught while
13: * performing a call. The cause exception is a required argument for the
14: * constructor. It may be retrieved later using {@link #getCause()}.
15: *
16: * @version $Revision: 1.20 $ $Date: 2007/05/15 12:28:56 $
17: * @author <a href="mailto:ernst@ernstdehaan.com">Ernst de Haan</a>
18: *
19: * @since XINS 1.0.0
20: */
21: public final class UnexpectedExceptionCallException extends
22: GenericCallException {
23:
24: /**
25: * Serial version UID. Used for serialization. The assigned value is for
26: * compatibility with XINS 1.2.5.
27: */
28: private static final long serialVersionUID = -3071445845610955883L;
29:
30: /**
31: * Constructs a new <code>UnexpectedExceptionCallException</code>.
32: *
33: * @param request
34: * the original request, cannot be <code>null</code>.
35: *
36: * @param target
37: * descriptor for the target that was attempted to be called, cannot be
38: * <code>null</code>.
39: *
40: * @param duration
41: * the call duration in milliseconds, must be >= 0.
42: *
43: * @param detail
44: * a detailed description of the problem, can be <code>null</code> if
45: * there is no more detail.
46: *
47: * @param cause
48: * the cause exception, can be <code>null</code>.
49: *
50: * @throws IllegalArgumentException
51: * if <code>request == null
52: * || target == null
53: * || cause == null
54: * || duration < 0</code>.
55: */
56: public UnexpectedExceptionCallException(CallRequest request,
57: TargetDescriptor target, long duration, String detail,
58: Throwable cause) throws IllegalArgumentException {
59:
60: // Call constructor of superclass
61: super ("Unexpected exception caught", request, target, duration,
62: detail, cause);
63: MandatoryArgumentChecker.check("cause", cause);
64: }
65: }
|