|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.nuxeo.opensocial.shindig.gadgets.NXHttpFetcher
public class NXHttpFetcher
We have to copy BasicHttpFetcher because we must override the way proxy is used (it's not handling authentication), and since the makeRespons method is private, we cant' use it. Therefore, as there is only two methods in the base class : the one we want to override and the one that is private, it makes non sense to find a way to override it.
Constructor Summary | |
---|---|
NXHttpFetcher()
Creates a new fetcher using the default maximum object size and timeout -- no limit and 5 seconds. |
|
NXHttpFetcher(int maxObjSize,
int connectionTimeoutMs)
Creates a new fetcher for fetching HTTP objects. |
Method Summary | |
---|---|
org.apache.shindig.gadgets.http.HttpResponse |
fetch(org.apache.shindig.gadgets.http.HttpRequest request)
|
void |
setConnectionTimeoutMs(int connectionTimeoutMs)
Change the global connection timeout for all fetchs. |
void |
setMaxObjectSizeBytes(int maxObjectSizeBytes)
Change the global maximum fetch size (in bytes) for all fetches. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NXHttpFetcher(int maxObjSize, int connectionTimeoutMs)
maxObjSize
- Maximum size, in bytes, of the object we will fetch, 0 if no
limit..connectionTimeoutMs
- timeout, in milliseconds, for requests.public NXHttpFetcher()
Method Detail |
---|
@Inject(optional=true) public void setMaxObjectSizeBytes(int maxObjectSizeBytes)
maxObjectSizeBytes
- value for maximum number of bytes, or 0 for no limit@Inject(optional=true) public void setConnectionTimeoutMs(int connectionTimeoutMs)
connectionTimeoutMs
- new connection timeout in millisecondspublic org.apache.shindig.gadgets.http.HttpResponse fetch(org.apache.shindig.gadgets.http.HttpRequest request)
fetch
in interface org.apache.shindig.gadgets.http.HttpFetcher
|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |