Package edu.uiuc.ncsa.security.servlet
Class ServiceClientHTTPException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- edu.uiuc.ncsa.security.core.exceptions.GeneralException
-
- edu.uiuc.ncsa.security.servlet.ServiceClientHTTPException
-
- All Implemented Interfaces:
Serializable
public class ServiceClientHTTPException extends GeneralException
In cases where there is a problem with a request (defined as getting a non-success status code back) this will wrap the content and the status code for further processing. Standard use of this has the content AND the message. The message may be empty, but if there is another cause it will be set. Properly the message should be logged and the content parsed for further use.Created by Jeff Gaynor
on 10/22/15 at 4:30 PM- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ServiceClientHTTPException()
ServiceClientHTTPException(String message)
ServiceClientHTTPException(String message, Throwable cause)
ServiceClientHTTPException(Throwable cause)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getContent()
This should have the body of the response as a string.int
getStatus()
This should have the status code returned by the server.boolean
hasContent()
void
setContent(String content)
void
setStatus(int status)
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Method Detail
-
hasContent
public boolean hasContent()
-
getContent
public String getContent()
This should have the body of the response as a string.- Returns:
-
setContent
public void setContent(String content)
-
getStatus
public int getStatus()
This should have the status code returned by the server.- Returns:
-
setStatus
public void setStatus(int status)
-
-