org.xins.common.http
Class StatusCodeHTTPCallException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byorg.xins.common.service.CallException
              extended byorg.xins.common.http.HTTPCallException
                  extended byorg.xins.common.http.StatusCodeHTTPCallException
All Implemented Interfaces:
Serializable

public final class StatusCodeHTTPCallException
extends HTTPCallException

Exception that indicates that an HTTP call failed because the returned HTTP status code was considered invalid.

Since:
XINS 1.0.0
Version:
$Revision: 1.15 $ $Date: 2006/08/28 09:12:31 $
Author:
Ernst de Haan
See Also:
Serialized Form

Constructor Summary
StatusCodeHTTPCallException(HTTPCallRequest request, TargetDescriptor target, long duration, int code)
          Constructs a new StatusCodeHTTPCallException based on the original request, target called, call duration and HTTP status code.
 
Method Summary
 int getStatusCode()
          Returns the HTTP status code.
 
Methods inherited from class org.xins.common.service.CallException
getDetail, getDuration, getMessage, getNext, getRequest, getTarget
 
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

StatusCodeHTTPCallException

public StatusCodeHTTPCallException(HTTPCallRequest request,
                                   TargetDescriptor target,
                                   long duration,
                                   int code)
                            throws IllegalArgumentException
Constructs a new StatusCodeHTTPCallException based on the original request, target called, call duration and HTTP status code.

Parameters:
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.
code - the HTTP status code.
Throws:
IllegalArgumentException - if request == null || target == null || duration < 0.
Since:
XINS 1.5.0.
Method Detail

getStatusCode

public int getStatusCode()
Returns the HTTP status code.

Returns:
the HTTP status code that is considered unacceptable.


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