com.atlassian.httpclient.apache.httpcomponents
Class DefaultResponse

java.lang.Object
  extended by com.atlassian.httpclient.apache.httpcomponents.DefaultResponse
All Implemented Interfaces:
Message, Response

public final class DefaultResponse
extends java.lang.Object
implements Response


Nested Class Summary
static class DefaultResponse.DefaultResponseBuilder
           
 
Nested classes/interfaces inherited from interface com.atlassian.httpclient.api.Response
Response.Builder
 
Constructor Summary
DefaultResponse(Headers headers, java.io.InputStream entityStream, com.atlassian.fugue.Option<java.lang.Long> maxEntitySize, int statusCode, java.lang.String statusText)
           
 
Method Summary
static DefaultResponse.DefaultResponseBuilder builder()
           
 java.lang.String getAccept()
           
 java.lang.String getContentCharset()
           
 java.lang.String getContentType()
           
 java.lang.String getEntity()
           
 java.io.InputStream getEntityStream()
           
 java.lang.String getHeader(java.lang.String name)
           
 java.util.Map<java.lang.String,java.lang.String> getHeaders()
           
 int getStatusCode()
           
 java.lang.String getStatusText()
           
 boolean hasEntity()
           
 boolean hasReadEntity()
           
 boolean isBadRequest()
           
 boolean isClientError()
           
 boolean isConflict()
           
 boolean isCreated()
           
 boolean isError()
           
 boolean isForbidden()
           
 boolean isInformational()
           
 boolean isInternalServerError()
           
 boolean isNoContent()
           
 boolean isNotFound()
           
 boolean isNotModified()
           
 boolean isNotSuccessful()
           
 boolean isOk()
           
 boolean isRedirection()
           
 boolean isSeeOther()
           
 boolean isServerError()
           
 boolean isServiceUnavailable()
           
 boolean isSuccessful()
           
 boolean isUnauthorized()
           
 Message validate()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.httpclient.api.Message
getContentCharset, getContentType, getEntity, getEntityStream, getHeader, getHeaders, hasEntity, hasReadEntity
 

Constructor Detail

DefaultResponse

public DefaultResponse(Headers headers,
                       java.io.InputStream entityStream,
                       com.atlassian.fugue.Option<java.lang.Long> maxEntitySize,
                       int statusCode,
                       java.lang.String statusText)
Method Detail

builder

public static DefaultResponse.DefaultResponseBuilder builder()

getStatusCode

public int getStatusCode()
Specified by:
getStatusCode in interface Response

getStatusText

public java.lang.String getStatusText()
Specified by:
getStatusText in interface Response

isInformational

public boolean isInformational()
Specified by:
isInformational in interface Response

isSuccessful

public boolean isSuccessful()
Specified by:
isSuccessful in interface Response

isOk

public boolean isOk()
Specified by:
isOk in interface Response

isCreated

public boolean isCreated()
Specified by:
isCreated in interface Response

isNoContent

public boolean isNoContent()
Specified by:
isNoContent in interface Response

isRedirection

public boolean isRedirection()
Specified by:
isRedirection in interface Response

isSeeOther

public boolean isSeeOther()
Specified by:
isSeeOther in interface Response

isNotModified

public boolean isNotModified()
Specified by:
isNotModified in interface Response

isClientError

public boolean isClientError()
Specified by:
isClientError in interface Response

isBadRequest

public boolean isBadRequest()
Specified by:
isBadRequest in interface Response

isUnauthorized

public boolean isUnauthorized()
Specified by:
isUnauthorized in interface Response

isForbidden

public boolean isForbidden()
Specified by:
isForbidden in interface Response

isNotFound

public boolean isNotFound()
Specified by:
isNotFound in interface Response

isConflict

public boolean isConflict()
Specified by:
isConflict in interface Response

isServerError

public boolean isServerError()
Specified by:
isServerError in interface Response

isInternalServerError

public boolean isInternalServerError()
Specified by:
isInternalServerError in interface Response

isServiceUnavailable

public boolean isServiceUnavailable()
Specified by:
isServiceUnavailable in interface Response

isError

public boolean isError()
Specified by:
isError in interface Response

isNotSuccessful

public boolean isNotSuccessful()
Specified by:
isNotSuccessful in interface Response

getContentType

public java.lang.String getContentType()
Specified by:
getContentType in interface Message

getContentCharset

public java.lang.String getContentCharset()
Specified by:
getContentCharset in interface Message

getAccept

public java.lang.String getAccept()

getEntityStream

public java.io.InputStream getEntityStream()
                                    throws java.lang.IllegalStateException
Specified by:
getEntityStream in interface Message
Throws:
java.lang.IllegalStateException

getEntity

public java.lang.String getEntity()
                           throws java.lang.IllegalStateException,
                                  java.lang.IllegalArgumentException
Specified by:
getEntity in interface Message
Throws:
java.lang.IllegalStateException
java.lang.IllegalArgumentException

hasEntity

public boolean hasEntity()
Specified by:
hasEntity in interface Message

hasReadEntity

public boolean hasReadEntity()
Specified by:
hasReadEntity in interface Message

getHeaders

public java.util.Map<java.lang.String,java.lang.String> getHeaders()
Specified by:
getHeaders in interface Message

getHeader

public java.lang.String getHeader(java.lang.String name)
Specified by:
getHeader in interface Message

validate

public Message validate()


Copyright © 2012-2014 Atlassian. All Rights Reserved.