|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wink.client.ClientConfig
public class ClientConfig
Provides client configuration. The ClientConfig is implemented using the
builder pattern so method calls can be easily aggregated. Custom Providers
are defined by calling the applications(Application...)
method.
Custom client handlers are defined by calling the
handlers(ClientHandler...)
method.
Constructor Summary | |
---|---|
ClientConfig()
Construct a new ClientConfig with the following default settings: proxy: none connect timeout: 60 seconds read timeout: 60 seconds follow redirects: true |
Method Summary | |
---|---|
ClientConfig |
applications(javax.ws.rs.core.Application... applications)
Add applications |
protected ClientConfig |
clone()
|
ClientConfig |
connectTimeout(int connectTimeout)
Set the connect timeout in milliseconds |
ClientConfig |
followRedirects(boolean followRedirects)
Set whether to client will automatically follow redirects |
java.util.List<javax.ws.rs.core.Application> |
getApplications()
Get an unmodifiable list of the applications |
protected ConnectionHandler |
getConnectionHandler()
Returns the client handler that acts as the connection handler. |
int |
getConnectTimeout()
Get the connect timeout in milliseconds |
java.util.List<ClientHandler> |
getHandlers()
Get an unmodifiable list of the client handlers |
java.lang.String |
getProxyHost()
Get the proxy host |
int |
getProxyPort()
Get the proxy port |
int |
getReadTimeout()
Get the read timeout in milliseconds |
ClientConfig |
handlers(ClientHandler... handlers)
Add client handlers |
boolean |
isFollowRedirects()
Returns whether to client will automatically follow redirects |
ClientConfig |
proxyHost(java.lang.String proxyHost)
Set the proxy host |
ClientConfig |
proxyPort(int proxyPort)
Set the proxy port |
ClientConfig |
readTimeout(int readTimeout)
Set the read timeout in milliseconds |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClientConfig()
Method Detail |
---|
public final java.lang.String getProxyHost()
public final ClientConfig proxyHost(java.lang.String proxyHost)
proxyHost
- proxy host
ClientConfigException
public final int getProxyPort()
public final ClientConfig proxyPort(int proxyPort)
proxyPort
- proxy port
ClientConfigException
public final int getConnectTimeout()
public final ClientConfig connectTimeout(int connectTimeout)
connectTimeout
- the connect timeout in milliseconds
ClientConfigException
public final int getReadTimeout()
public final ClientConfig readTimeout(int readTimeout)
readTimeout
- the read timeout in milliseconds
ClientConfigException
public final boolean isFollowRedirects()
public final ClientConfig followRedirects(boolean followRedirects)
followRedirects
- whether to client will automatically follow
redirects
ClientConfigException
public final java.util.List<ClientHandler> getHandlers()
public final ClientConfig handlers(ClientHandler... handlers)
handlers
- the handlers to add
ClientConfigException
protected ConnectionHandler getConnectionHandler()
This method should be overridden in order to provide an alternate connection handler.
public final java.util.List<javax.ws.rs.core.Application> getApplications()
public final ClientConfig applications(javax.ws.rs.core.Application... applications)
applications
- the applications to add
ClientConfigException
protected ClientConfig clone()
clone
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |