|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Throwable java.lang.Exception org.xins.common.service.CallException
Root class for all exceptions that indicate a ServiceCaller
call failed. This exception is typically only thrown by class
ServiceCaller
and subclasses.
Call exceptions can be linked. The first exception is then actually
thrown to the caller. The caller can get the linked exceptions using
getNext()
.
Constructor Summary | |
protected |
CallException(String shortReason,
CallRequest request,
TargetDescriptor target,
long duration,
String detail,
Throwable cause)
Constructs a new CallException based on a short reason, the
original request, target called, call duration, detail message and cause
exception. |
Method Summary | |
String |
getDetail()
Returns a detailed description of problem, if any. |
long |
getDuration()
Returns the call duration. |
String |
getMessage()
Returns the detail message string of this exception. |
CallException |
getNext()
Gets the next linked CallException , if there is any. |
CallRequest |
getRequest()
Returns the original request. |
TargetDescriptor |
getTarget()
Returns the descriptor for the target that was attempted to be called. |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
protected CallException(String shortReason, CallRequest request, TargetDescriptor target, long duration, String detail, Throwable cause) throws IllegalArgumentException
CallException
based on a short reason, the
original request, target called, call duration, detail message and cause
exception.
shortReason
- the short reason, cannot be null
.request
- the original request, cannot be null
.target
- descriptor for the target that was attempted to be called, cannot be
null
.duration
- the call duration in milliseconds, must be >= 0.detail
- a detailed description of the problem, can be null
if
there is no more detail.cause
- the cause exception, can be null
.
IllegalArgumentException
- if shortReason == null
|| request == null
|| target == null
|| duration < 0
.Method Detail |
public String getMessage()
null
.public final CallRequest getRequest()
null
.public final TargetDescriptor getTarget()
null
.public final long getDuration()
public final CallException getNext()
CallException
, if there is any.
CallException
, or null
if
there is none.public String getDetail()
null
.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |