@ThreadSafe public class Subscriber extends Object
Constructor and Description |
---|
Subscriber(Client client,
int lookupIntervalSecs,
int maxLookupFailuresBeforeError,
String... lookupHosts) |
Subscriber(int lookupIntervalSecs,
String... lookupHosts) |
Subscriber(String... lookupHosts) |
Modifier and Type | Method and Description |
---|---|
Client |
getClient() |
Config |
getConfig() |
int |
getConnectionCount() |
int |
getDefaultMaxInFlight() |
Integer |
getExecutorQueueSize() |
FailedMessageHandler |
getFailedMessageHandler() |
int |
getLookupIntervalSecs() |
int |
getMaxAttempts() |
int |
getMaxFlushDelayMillis() |
void |
setConfig(Config config) |
void |
setDefaultMaxInFlight(int defaultMaxInFlight)
the maxInFlight to use for new subscriptions
|
void |
setFailedMessageHandler(FailedMessageHandler failedMessageHandler) |
void |
setMaxAttempts(int maxAttempts) |
void |
setMaxFlushDelayMillis(int maxFlushDelayMillis) |
void |
setMaxInFlight(String topic,
String channel,
int maxInFlight) |
void |
stop() |
void |
subscribe(String topic,
String channel,
int maxInFlight,
MessageHandler handler)
Subscribe to a topic.
|
void |
subscribe(String topic,
String channel,
MessageDataHandler handler) |
void |
subscribe(String topic,
String channel,
MessageHandler handler) |
public Subscriber(Client client, int lookupIntervalSecs, int maxLookupFailuresBeforeError, String... lookupHosts)
public Subscriber(int lookupIntervalSecs, String... lookupHosts)
public Subscriber(String... lookupHosts)
public void subscribe(String topic, String channel, MessageHandler handler)
public void subscribe(String topic, String channel, MessageDataHandler handler)
public void subscribe(String topic, String channel, int maxInFlight, MessageHandler handler)
public void stop()
public int getDefaultMaxInFlight()
public void setDefaultMaxInFlight(int defaultMaxInFlight)
public int getMaxFlushDelayMillis()
public void setMaxFlushDelayMillis(int maxFlushDelayMillis)
public int getMaxAttempts()
public void setMaxAttempts(int maxAttempts)
public FailedMessageHandler getFailedMessageHandler()
public void setFailedMessageHandler(FailedMessageHandler failedMessageHandler)
public int getLookupIntervalSecs()
public Integer getExecutorQueueSize()
public int getConnectionCount()
public final Client getClient()
public Config getConfig()
public void setConfig(Config config)
Copyright © 2018. All rights reserved.