mirror of https://github.com/apache/jclouds.git
formatting
git-svn-id: http://jclouds.googlecode.com/svn/trunk@1903 3d8758e0-26b5-11de-8745-db77d3ebf521
This commit is contained in:
parent
d941ae646e
commit
4a091d0669
|
@ -24,8 +24,7 @@
|
||||||
package org.jclouds.http;
|
package org.jclouds.http;
|
||||||
|
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.net.URL;
|
import java.net.URI;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a response produced from {@link HttpCommandExecutorService}
|
* Represents a response produced from {@link HttpCommandExecutorService}
|
||||||
|
@ -33,53 +32,53 @@ import java.net.URL;
|
||||||
* @author Adrian Cole
|
* @author Adrian Cole
|
||||||
*/
|
*/
|
||||||
public class HttpResponse extends HttpMessage {
|
public class HttpResponse extends HttpMessage {
|
||||||
private URL requestURL;
|
private URI requestURL;
|
||||||
private int statusCode;
|
private int statusCode;
|
||||||
private String message;
|
private String message;
|
||||||
private InputStream content;
|
private InputStream content;
|
||||||
|
|
||||||
public HttpResponse(URL requestURL) {
|
|
||||||
this.requestURL = requestURL;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
public HttpResponse(URI requestURL) {
|
||||||
public String toString() {
|
this.requestURL = requestURL;
|
||||||
final StringBuilder sb = new StringBuilder();
|
}
|
||||||
sb.append("HttpResponse");
|
|
||||||
sb.append("{statusCode=").append(statusCode);
|
|
||||||
sb.append(", headers=").append(headers);
|
|
||||||
sb.append(", message='").append(message).append('\'');
|
|
||||||
sb.append(", content set=").append(content != null);
|
|
||||||
sb.append('}');
|
|
||||||
return sb.toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getStatusCode() {
|
@Override
|
||||||
return statusCode;
|
public String toString() {
|
||||||
}
|
final StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("HttpResponse");
|
||||||
|
sb.append("{statusCode=").append(statusCode);
|
||||||
|
sb.append(", headers=").append(headers);
|
||||||
|
sb.append(", message='").append(message).append('\'');
|
||||||
|
sb.append(", content set=").append(content != null);
|
||||||
|
sb.append('}');
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
public void setStatusCode(int statusCode) {
|
public int getStatusCode() {
|
||||||
this.statusCode = statusCode;
|
return statusCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getMessage() {
|
public void setStatusCode(int statusCode) {
|
||||||
return message;
|
this.statusCode = statusCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMessage(String message) {
|
public String getMessage() {
|
||||||
this.message = message;
|
return message;
|
||||||
}
|
}
|
||||||
|
|
||||||
public InputStream getContent() {
|
public void setMessage(String message) {
|
||||||
return content;
|
this.message = message;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setContent(InputStream content) {
|
public InputStream getContent() {
|
||||||
this.content = content;
|
return content;
|
||||||
}
|
}
|
||||||
|
|
||||||
public URL getRequestURL() {
|
public void setContent(InputStream content) {
|
||||||
return this.requestURL;
|
this.content = content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public URI getRequestURL() {
|
||||||
|
return this.requestURL;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue