| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.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 | acceptHeaderAutoSet(boolean isAcceptHeaderAutoSet)Set whether client will automatically set an appropriate Accept header | 
|  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 | isAcceptHeaderAutoSet()Returns whether client will automatically set an appropriate Accept header | 
|  boolean | isFollowRedirects()Returns whether to client will automatically follow redirects | 
|  boolean | isLoadWinkApplications() | 
|  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 | 
|  void | setLoadWinkApplications(boolean loadWinkApplications) | 
| 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
ClientConfigExceptionpublic final int getProxyPort()
public final ClientConfig proxyPort(int proxyPort)
proxyPort - proxy port
ClientConfigExceptionpublic final int getConnectTimeout()
public final ClientConfig connectTimeout(int connectTimeout)
connectTimeout - the connect timeout in milliseconds
ClientConfigExceptionpublic final int getReadTimeout()
public final ClientConfig readTimeout(int readTimeout)
readTimeout - the read timeout in milliseconds
ClientConfigExceptionpublic final boolean isFollowRedirects()
public final ClientConfig followRedirects(boolean followRedirects)
followRedirects - whether to client will automatically follow
            redirects
ClientConfigExceptionpublic final boolean isAcceptHeaderAutoSet()
public final ClientConfig acceptHeaderAutoSet(boolean isAcceptHeaderAutoSet)
isAcceptHeaderAutoSet - whether client will automatically set an
            appropriate Accept header
ClientConfigExceptionpublic final java.util.List<ClientHandler> getHandlers()
public final ClientConfig handlers(ClientHandler... handlers)
handlers - the handlers to add
ClientConfigExceptionprotected 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
ClientConfigExceptionprotected ClientConfig clone()
clone in class java.lang.Objectpublic void setLoadWinkApplications(boolean loadWinkApplications)
public boolean isLoadWinkApplications()
| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||