|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.api.client.http.LowLevelHttpRequest
public abstract class LowLevelHttpRequest
Low-level HTTP request.
This allows providing a different implementation of the HTTP request that is more compatible with the Java environment used.
Implementation has no fields and therefore thread-safe, but sub-classes are not necessarily thread-safe.
Constructor Summary | |
---|---|
LowLevelHttpRequest()
|
Method Summary | |
---|---|
abstract void |
addHeader(String name,
String value)
Adds a header to the HTTP request. |
abstract LowLevelHttpResponse |
execute()
Executes the request and returns a low-level HTTP response object. |
abstract void |
setContent(HttpContent content)
Sets the HTTP request content. |
void |
setTimeout(int connectTimeout,
int readTimeout)
Sets the connection and read timeouts. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LowLevelHttpRequest()
Method Detail |
---|
public abstract void addHeader(String name, String value)
Note that multiple headers of the same name need to be supported, in which case
addHeader(java.lang.String, java.lang.String)
will be called for each instance of the header.
name
- header namevalue
- header valuepublic abstract void setContent(HttpContent content) throws IOException
IOException
- I/O exceptionpublic void setTimeout(int connectTimeout, int readTimeout) throws IOException
Default implementation does nothing, but subclasses should normally override.
connectTimeout
- timeout in milliseconds to establish a connection or 0
for an
infinite timeoutreadTimeout
- Timeout in milliseconds to read data from an established connection or
0
for an infinite timeout
IOException
- I/O exceptionpublic abstract LowLevelHttpResponse execute() throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |