org.apache.oltu.oauth2.common.message
Class OAuthResponse

java.lang.Object
  extended by org.apache.oltu.oauth2.common.message.OAuthResponse
All Implemented Interfaces:
OAuthMessage
Direct Known Subclasses:
OAuthASResponse, OAuthRSResponse

public class OAuthResponse
extends Object
implements OAuthMessage


Nested Class Summary
static class OAuthResponse.OAuthErrorResponseBuilder
           
static class OAuthResponse.OAuthResponseBuilder
           
 
Field Summary
protected  String body
           
protected  Map<String,String> headers
           
protected  int responseStatus
           
protected  String uri
           
 
Constructor Summary
protected OAuthResponse(String uri, int responseStatus)
           
 
Method Summary
 void addHeader(String name, String header)
           
static OAuthResponse.OAuthErrorResponseBuilder errorResponse(int code)
           
 String getBody()
           
 String getHeader(String name)
           
 Map<String,String> getHeaders()
           
 String getLocationUri()
           
 int getResponseStatus()
           
 void setBody(String body)
           
 void setHeaders(Map<String,String> headers)
           
 void setLocationUri(String uri)
           
static OAuthResponse.OAuthResponseBuilder status(int code)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

responseStatus

protected int responseStatus

uri

protected String uri

body

protected String body

headers

protected Map<String,String> headers
Constructor Detail

OAuthResponse

protected OAuthResponse(String uri,
                        int responseStatus)
Method Detail

status

public static OAuthResponse.OAuthResponseBuilder status(int code)

errorResponse

public static OAuthResponse.OAuthErrorResponseBuilder errorResponse(int code)

getLocationUri

public String getLocationUri()
Specified by:
getLocationUri in interface OAuthMessage

setLocationUri

public void setLocationUri(String uri)
Specified by:
setLocationUri in interface OAuthMessage

getBody

public String getBody()
Specified by:
getBody in interface OAuthMessage

setBody

public void setBody(String body)
Specified by:
setBody in interface OAuthMessage

getHeader

public String getHeader(String name)
Specified by:
getHeader in interface OAuthMessage

getHeaders

public Map<String,String> getHeaders()
Specified by:
getHeaders in interface OAuthMessage

setHeaders

public void setHeaders(Map<String,String> headers)
Specified by:
setHeaders in interface OAuthMessage

getResponseStatus

public int getResponseStatus()

addHeader

public void addHeader(String name,
                      String header)
Specified by:
addHeader in interface OAuthMessage


Copyright © 2010–2014 The Apache Software Foundation. All rights reserved.