public class ClientBuilder extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Authentication |
auth |
protected int |
connectionTimeoutMillis |
protected boolean |
enableGZip |
protected StreamingEndpoint |
endpoint |
protected BlockingQueue<Event> |
eventQueue |
protected ExecutorService |
executorService |
protected Hosts |
hosts |
protected String |
name |
protected HosebirdMessageProcessor |
processor |
protected RateTracker |
rateTracker |
protected ReconnectionManager |
reconnectionManager |
protected org.apache.http.conn.scheme.SchemeRegistry |
schemeRegistry |
protected int |
socketTimeoutMillis |
| Constructor and Description |
|---|
ClientBuilder() |
| Modifier and Type | Method and Description |
|---|---|
ClientBuilder |
authentication(Authentication auth) |
BasicClient |
build() |
ClientBuilder |
connectionTimeout(int millis) |
ClientBuilder |
endpoint(StreamingEndpoint endpoint) |
ClientBuilder |
endpoint(String uri,
String httpMethod) |
ClientBuilder |
eventMessageQueue(BlockingQueue<Event> events) |
ClientBuilder |
gzipEnabled(boolean gzip) |
ClientBuilder |
hosts(Hosts hosts) |
ClientBuilder |
hosts(String host) |
ClientBuilder |
name(String name) |
ClientBuilder |
processor(HosebirdMessageProcessor processor) |
ClientBuilder |
rateTracker(RateTracker rateTracker) |
ClientBuilder |
reconnectionManager(ReconnectionManager manager) |
ClientBuilder |
retries(int retries) |
ClientBuilder |
schemeRegistry(org.apache.http.conn.scheme.SchemeRegistry schemeRegistry) |
ClientBuilder |
socketTimeout(int millis) |
protected Authentication auth
protected Hosts hosts
protected HosebirdMessageProcessor processor
protected StreamingEndpoint endpoint
protected boolean enableGZip
protected String name
protected RateTracker rateTracker
protected final ExecutorService executorService
protected BlockingQueue<Event> eventQueue
protected ReconnectionManager reconnectionManager
protected int socketTimeoutMillis
protected int connectionTimeoutMillis
protected org.apache.http.conn.scheme.SchemeRegistry schemeRegistry
public ClientBuilder name(String name)
name - Name of the client used for logging and other diagnostic purposes.public ClientBuilder gzipEnabled(boolean gzip)
gzip - Turn gzip on or off. Enabled by defaultpublic ClientBuilder hosts(String host)
host - Http host in the form of public ClientBuilder hosts(Hosts hosts)
public ClientBuilder endpoint(StreamingEndpoint endpoint)
endpoint - StreamingEndpoint that the client will connect topublic ClientBuilder authentication(Authentication auth)
public ClientBuilder processor(HosebirdMessageProcessor processor)
public ClientBuilder eventMessageQueue(BlockingQueue<Event> events)
public ClientBuilder socketTimeout(int millis)
public ClientBuilder connectionTimeout(int millis)
public ClientBuilder retries(int retries)
retries - Number of retries to attempt when we experience retryable connection errorspublic ClientBuilder reconnectionManager(ReconnectionManager manager)
public ClientBuilder endpoint(String uri, String httpMethod)
public ClientBuilder rateTracker(RateTracker rateTracker)
public ClientBuilder schemeRegistry(org.apache.http.conn.scheme.SchemeRegistry schemeRegistry)
public BasicClient build()
Copyright © 2014. All Rights Reserved.