public class ClouderaManagerClientBuilder extends Object
Modifier and Type | Field and Description |
---|---|
static long |
DEFAULT_CONNECTION_TIMEOUT |
static TimeUnit |
DEFAULT_CONNECTION_TIMEOUT_UNITS |
static long |
DEFAULT_RECEIVE_TIMEOUT |
static TimeUnit |
DEFAULT_RECEIVE_TIMEOUT_UNITS |
static int |
DEFAULT_TCP_PORT |
Constructor and Description |
---|
ClouderaManagerClientBuilder() |
Modifier and Type | Method and Description |
---|---|
ApiRootResource |
build()
Build an ApiRootResource proxy object for communicating with the remote server.
|
protected <T> T |
build(Class<T> proxyType)
Build a client proxy, for a specific proxy type.
|
static void |
clearCachedResources()
Clears any cached resources shared during build operations
across instances of this class.
|
static void |
closeClient(Object root)
Releases the internal state and configuration associated with this client.
|
ClouderaManagerClientBuilder |
disableTlsCertValidation() |
ClouderaManagerClientBuilder |
disableTlsCnValidation() |
ClouderaManagerClientBuilder |
enableLogging() |
ClouderaManagerClientBuilder |
enableStreamAutoClosure()
By default, ClouderaManagerClientBuilder disables auto-closure of response
streams when generated client are making requests.
|
ClouderaManagerClientBuilder |
enableTLS() |
ClouderaManagerClientBuilder |
setMaintainSessionAcrossRequests(boolean maintainSessionAcrossRequests) |
ClouderaManagerClientBuilder |
setThreadSafe(boolean threadSafe) |
void |
setTrustManagers(TrustManager[] managers) |
ClouderaManagerClientBuilder |
withAcceptLanguage(String acceptLaunguage) |
ClouderaManagerClientBuilder |
withBaseURL(URL baseUrl) |
ClouderaManagerClientBuilder |
withConnectionTimeout(long connectionTimeout,
TimeUnit connectionTimeoutUnits) |
ClouderaManagerClientBuilder |
withHost(String hostname) |
ClouderaManagerClientBuilder |
withPort(int port) |
ClouderaManagerClientBuilder |
withReceiveTimeout(long receiveTimeout,
TimeUnit receiveTimeoutUnits) |
ClouderaManagerClientBuilder |
withUsernamePassword(String username,
String password) |
public static final int DEFAULT_TCP_PORT
public static final long DEFAULT_CONNECTION_TIMEOUT
public static final TimeUnit DEFAULT_CONNECTION_TIMEOUT_UNITS
public static final long DEFAULT_RECEIVE_TIMEOUT
public static final TimeUnit DEFAULT_RECEIVE_TIMEOUT_UNITS
public ClouderaManagerClientBuilder withAcceptLanguage(String acceptLaunguage)
public ClouderaManagerClientBuilder withBaseURL(URL baseUrl)
public ClouderaManagerClientBuilder withHost(String hostname)
public ClouderaManagerClientBuilder withPort(int port)
public ClouderaManagerClientBuilder enableTLS()
public ClouderaManagerClientBuilder enableLogging()
public ClouderaManagerClientBuilder setThreadSafe(boolean threadSafe)
threadSafe
- Set if to create a thread safe client.public ClouderaManagerClientBuilder setMaintainSessionAcrossRequests(boolean maintainSessionAcrossRequests)
maintainSessionAcrossRequests
- If set to true, created client will
maintain HTTP session across multiple requests. Setting this to true also
means that login attempt will be made for the 1st request for a new client
or when the previous session has time out.public ClouderaManagerClientBuilder withUsernamePassword(String username, String password)
public ClouderaManagerClientBuilder withConnectionTimeout(long connectionTimeout, TimeUnit connectionTimeoutUnits)
public ClouderaManagerClientBuilder withReceiveTimeout(long receiveTimeout, TimeUnit receiveTimeoutUnits)
public ClouderaManagerClientBuilder disableTlsCertValidation()
public ClouderaManagerClientBuilder disableTlsCnValidation()
public ClouderaManagerClientBuilder enableStreamAutoClosure()
public void setTrustManagers(TrustManager[] managers)
public ApiRootResource build()
protected <T> T build(Class<T> proxyType)
proxyType
- proxy type classpublic static void closeClient(Object root)
root
- The resource returned by the build() method of this
builder classpublic static void clearCachedResources()
Copyright © Cloudera, Inc. Released under Apache License, Version 2.0.