Package com.okta.commons.http
Class DefaultResponse
- java.lang.Object
-
- com.okta.commons.http.DefaultResponse
-
- All Implemented Interfaces:
HttpMessage,Response
public class DefaultResponse extends java.lang.Object implements Response
- Since:
- 0.5.0
-
-
Constructor Summary
Constructors Constructor Description DefaultResponse(int httpStatus, MediaType contentType, java.io.InputStream body, long contentLength)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.InputStreamgetBody()HttpHeadersgetHeaders()intgetHttpStatus()booleanhasBody()booleanisClientError()booleanisError()booleanisServerError()voidsetHeaders(HttpHeaders headers)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.okta.commons.http.HttpMessage
hasBody
-
-
-
-
Constructor Detail
-
DefaultResponse
public DefaultResponse(int httpStatus, MediaType contentType, java.io.InputStream body, long contentLength)
-
-
Method Detail
-
getHttpStatus
public int getHttpStatus()
- Specified by:
getHttpStatusin interfaceResponse
-
getHeaders
public HttpHeaders getHeaders()
- Specified by:
getHeadersin interfaceHttpMessage
-
setHeaders
public void setHeaders(HttpHeaders headers)
- Specified by:
setHeadersin interfaceHttpMessage
-
isServerError
public boolean isServerError()
- Specified by:
isServerErrorin interfaceResponse
-
isClientError
public boolean isClientError()
- Specified by:
isClientErrorin interfaceResponse
-
getBody
public java.io.InputStream getBody()
- Specified by:
getBodyin interfaceHttpMessage
-
hasBody
public boolean hasBody()
- Specified by:
hasBodyin interfaceHttpMessage
-
-