@ThreadSafe public class Client extends Object
Constructor and Description |
---|
Client() |
Modifier and Type | Method and Description |
---|---|
byte[] |
getAuthSecret() |
static Client |
getDefaultClient() |
ExecutorService |
getExecutor() |
SSLSocketFactory |
getSSLSocketFactory() |
void |
setAuthSecret(byte[] authSecret) |
void |
setAuthSecret(String authSecret) |
void |
setExecutor(ExecutorService exec) |
void |
setSSLSocketFactory(SSLSocketFactory sslSocketFactory) |
boolean |
stop() |
boolean |
stop(int waitMillis)
Stops all subscribers, waits for in-flight messages to be finished or requeued, stops the executor that handles messages,
then stops all publishers.
|
boolean |
stopSubscribers(int waitMillis)
Stops all subscribers, waits for in-flight messages to be finished or requeued, then closes subscriber connections.
|
public static Client getDefaultClient()
public boolean stop()
public boolean stop(int waitMillis)
waitMillis
- Time to wait for everything to stop, in milliseconds. Soft limit that may be exceeded by about 200 ms.public boolean stopSubscribers(int waitMillis)
waitMillis
- Time to wait for in-flight messages to be finished, in milliseconds.public void setExecutor(ExecutorService exec)
public ExecutorService getExecutor()
public SSLSocketFactory getSSLSocketFactory()
public void setSSLSocketFactory(SSLSocketFactory sslSocketFactory)
public byte[] getAuthSecret()
public void setAuthSecret(byte[] authSecret)
public void setAuthSecret(String authSecret)
Copyright © 2018. All rights reserved.