|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectus.monoid.web.Resty.Option
public abstract static class Resty.Option
Base class for Resty options. You can also create your own options. Override one of the apply methods to change an object like URLConnection before it is being used.
Constructor Summary | |
---|---|
Resty.Option()
|
Method Summary | |
---|---|
void |
apply(URLConnection aConnection)
Override this to get access to the URLConnection before the actual connection is made. |
void |
init(Resty resty)
Callback from Resty when the option is set on the Resty instance. |
static Resty.Proxy |
proxy(String aHostName,
int aPortNumber)
Set a proxy (overrides standard proxy settings) |
static Resty.Timeout |
timeout(int t)
Specify the connection timeout in milliseconds. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Resty.Option()
Method Detail |
---|
public void apply(URLConnection aConnection)
aConnection
- public void init(Resty resty)
public static Resty.Timeout timeout(int t)
new Resty(Option.timeout(3000));
t
- the timeout
URLConnection.setConnectTimeout(int)
public static Resty.Proxy proxy(String aHostName, int aPortNumber)
aHostName
- the hostname to useaPortNumber
- the port number
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |