- clear() - Method in class io.nats.client.Statistics
-
Clears the statistics.
- clearMaxPending() - Method in interface io.nats.client.Subscription
-
Clears the the maximum number of unprocessed messages and bytes for this subscription.
- clone() - Method in class io.nats.client.ConnectionFactory
-
.
- close() - Method in class io.nats.benchmark.Benchmark
-
Closes this benchmark and calculates totals and times.
- close() - Method in interface io.nats.client.Subscription
-
.
- ClosedCallback - Interface in io.nats.client
-
When a Connection
is closed for any reason, the Connection
object's
ClosedCallback
is notifed, if one has been registered.
- Connection - Interface in io.nats.client
-
A Connection
object is a client's active connection to NATS.
- ConnectionEvent - Class in io.nats.client
-
A ConnectionEvent
object contains information about about an asynchronous event that has
occurred on a connection.
- ConnectionFactory - Class in io.nats.client
-
A ConnectionFactory
object encapsulates a set of connection configuration options.
- ConnectionFactory(Properties) - Constructor for class io.nats.client.ConnectionFactory
-
Constructs a new connection factory from a
Properties
object.
- ConnectionFactory() - Constructor for class io.nats.client.ConnectionFactory
-
Constructs a connection factory using default parameters.
- ConnectionFactory(String) - Constructor for class io.nats.client.ConnectionFactory
-
Constructs a connection factory using the supplied URL string as default.
- ConnectionFactory(String[]) - Constructor for class io.nats.client.ConnectionFactory
-
Constructs a connection factory from a list of NATS server URL strings.
- ConnectionFactory(String, String[]) - Constructor for class io.nats.client.ConnectionFactory
-
Constructs a connection factory from a list of NATS server URLs, using url
as the
primary address.
- ConnectionFactory(ConnectionFactory) - Constructor for class io.nats.client.ConnectionFactory
-
Constructs a ConnectionFactory
by copying the supplied ConnectionFactory
.
- Constants - Class in io.nats.client
-
Constants for io.nats.client
- Constants.ConnState - Enum in io.nats.client
-
Connection states for AbstractConnection.getState()
.
- createConnection() - Method in class io.nats.client.ConnectionFactory
-
Creates an active connection to a NATS server
- csv() - Method in class io.nats.benchmark.Benchmark
-
Returns a list of text lines for output to a CSV file.
- ERR_AUTHORIZATION - Static variable in class io.nats.client.Constants
-
This error message is defined as String "nats: authorization violation".
- ERR_BAD_SUBJECT - Static variable in class io.nats.client.Constants
-
This error message is defined as String "nats: invalid subject".
- ERR_BAD_SUBSCRIPTION - Static variable in class io.nats.client.Constants
-
This error message is defined as String "nats: invalid subscription".
- ERR_BAD_TIMEOUT - Static variable in class io.nats.client.Constants
-
This error message is defined as String "nats: timeout invalid".
- ERR_CONNECTION_CLOSED - Static variable in class io.nats.client.Constants
-
This error message is defined as String "nats: connection closed".
- ERR_CONNECTION_READ - Static variable in class io.nats.client.Constants
-
This error message is defined as String "nats: connection read error".
- ERR_INVALID_CONNECTION - Static variable in class io.nats.client.Constants
-
This error message is defined as String "nats: invalid connection".
- ERR_INVALID_MESSAGE - Static variable in class io.nats.client.Constants
-
This error message is defined as String "nats: invalid message or message nil".
- ERR_JSON_PARSE - Static variable in class io.nats.client.Constants
-
This error message is defined as String "nats: connect message, json parse err".
- ERR_MAX_MESSAGES - Static variable in class io.nats.client.Constants
-
This error message is defined as String "nats: maximum messages delivered".
- ERR_MAX_PAYLOAD - Static variable in class io.nats.client.Constants
-
This error message is defined as String "nats: maximum payload exceeded".
- ERR_NO_INFO_RECEIVED - Static variable in class io.nats.client.Constants
-
This error message is defined as String "nats: protocol exception, INFO not received".
- ERR_NO_SERVERS - Static variable in class io.nats.client.Constants
-
This error message is defined as String "nats: no servers available for connection".
- ERR_PERMISSIONS_VIOLATION - Static variable in class io.nats.client.Constants
-
This error message is defined as String "nats: permissions violation".
- ERR_PROTOCOL - Static variable in class io.nats.client.Constants
-
This error message is defined as String "nats: protocol error".
- ERR_RECONNECT_BUF_EXCEEDED - Static variable in class io.nats.client.Constants
-
This error message is defined as String "nats: outbound buffer limit exceeded".
- ERR_SECURE_CONN_REQUIRED - Static variable in class io.nats.client.Constants
-
This error message is defined as String "nats: secure connection required".
- ERR_SECURE_CONN_WANTED - Static variable in class io.nats.client.Constants
-
This error message is defined as String "nats: secure connection not available".
- ERR_SLOW_CONSUMER - Static variable in class io.nats.client.Constants
-
This error message is defined as String "nats: slow consumer, messages dropped".
- ERR_STALE_CONNECTION - Static variable in class io.nats.client.Constants
-
This error message is defined as String "nats: stale connection".
- ERR_SYNC_SUB_REQUIRED - Static variable in class io.nats.client.Constants
-
This error message is defined as String "nats: illegal call on an async subscription".
- ERR_TCP_FLUSH_FAILED - Static variable in class io.nats.client.Constants
-
This error message is defined as String "nats: i/o exception when flushing output stream".
- ERR_TIMEOUT - Static variable in class io.nats.client.Constants
-
This error message is defined as String "nats: timeout".
- ExceptionHandler - Interface in io.nats.client
-
If NATS detects a serious problem with a Connection
object, it informs the
Connection
object's ExceptionHandler
, if one has been registered.
- getClosedCallback() - Method in class io.nats.client.ConnectionFactory
-
- getConnection() - Method in class io.nats.client.ConnectionEvent
-
- getConnection() - Method in exception io.nats.client.NATSException
-
- getConnectionName() - Method in class io.nats.client.ConnectionFactory
-
Gets the name associated with this Connection
- getConnectionTimeout() - Method in class io.nats.client.ConnectionFactory
-
Returns the connection timeout interval in milliseconds.
- getData() - Method in class io.nats.client.Message
-
Returns the message payload.
- getDelivered() - Method in interface io.nats.client.Subscription
-
Returns the number of messages delivered to, but not processed, by this Subscription.
- getDisconnectedCallback() - Method in class io.nats.client.ConnectionFactory
-
- getDropped() - Method in interface io.nats.client.Subscription
-
Returns the number of messages that this subscription has dropped due to "slow consumer"
condition.
- getExceptionHandler() - Method in class io.nats.client.ConnectionFactory
-
- getHost() - Method in class io.nats.client.ConnectionFactory
-
Gets the default server host, if set.
- getInBytes() - Method in class io.nats.client.Statistics
-
- getInMsgs() - Method in class io.nats.client.Statistics
-
- getMaxPingsOut() - Method in class io.nats.client.ConnectionFactory
-
Returns the maximum number of outstanding server pings
- getMaxReconnect() - Method in class io.nats.client.ConnectionFactory
-
Gets the maximum number of reconnection attempts for this connection.
- getOutBytes() - Method in class io.nats.client.Statistics
-
- getOutMsgs() - Method in class io.nats.client.Statistics
-
- getPassword() - Method in class io.nats.client.ConnectionFactory
-
Gets the default password, or null
if not set.
- getPendingBytes() - Method in interface io.nats.client.Subscription
-
Returns the current number of pending bytes for this subscription.
- getPendingBytesLimit() - Method in interface io.nats.client.Subscription
-
Returns the maximum number of unprocessed message bytes that can be left pending on this
subscription before messages are dropped and a slow consumer exception is thrown.
- getPendingBytesMax() - Method in interface io.nats.client.Subscription
-
Returns the maximum number of pending bytes seen for this subscription.
- getPendingMsgs() - Method in interface io.nats.client.Subscription
-
Returns the current number of pending messages for this subscription.
- getPendingMsgsLimit() - Method in interface io.nats.client.Subscription
-
Returns the maximum number of unprocessed messages that can be left pending on this
subscription before messages are dropped and a slow consumer exception is thrown.
- getPendingMsgsMax() - Method in interface io.nats.client.Subscription
-
Returns the maximum number of pending messages seen for this subscription.
- getPingInterval() - Method in class io.nats.client.ConnectionFactory
-
Gets the server ping interval in milliseconds.
- getPort() - Method in class io.nats.client.ConnectionFactory
-
Gets the default server port, if set.
- getQueue() - Method in interface io.nats.client.Subscription
-
Returns the optional queue group name.
- getQueuedMessageCount() - Method in interface io.nats.client.Subscription
-
- getReconnectBufSize() - Method in class io.nats.client.ConnectionFactory
-
Returns the maximum size in bytes of the pending message buffer, which is used to buffer
messages between a disconnect and subsequent reconnect.
- getReconnectedCallback() - Method in class io.nats.client.ConnectionFactory
-
- getReconnects() - Method in class io.nats.client.Statistics
-
- getReconnectWait() - Method in class io.nats.client.ConnectionFactory
-
Returns the reconnect wait interval in milliseconds.
- getReplyTo() - Method in class io.nats.client.Message
-
Returns the reply subject.
- getServers() - Method in class io.nats.client.ConnectionFactory
-
Gets the server list as URI
.
- getSslContext() - Method in class io.nats.client.ConnectionFactory
-
- getSSLContext() - Method in class io.nats.client.ConnectionFactory
-
Returns the
SSLContext
for this connection factory.
- getSubject() - Method in class io.nats.client.Message
-
Returns the message subject.
- getSubject() - Method in interface io.nats.client.Subscription
-
Retrieves the subject of interest from the Subscription
object.
- getSubscription() - Method in class io.nats.client.Message
-
Returns the Subscription
object the message was received on.
- getSubscription() - Method in exception io.nats.client.NATSException
-
- getUrlString() - Method in class io.nats.client.ConnectionFactory
-
Returns the default server URL string, if set.
- getUsername() - Method in class io.nats.client.ConnectionFactory
-
Gets the default username, if set.
- globalNUID - Static variable in class io.nats.client.NUID
-
- PROP_CLOSED_CB - Static variable in class io.nats.client.ConnectionFactory
-
This property is defined as String "io.nats.client.callback.closed".
- PROP_CLOSED_CB - Static variable in class io.nats.client.Constants
-
- PROP_CONNECTION_NAME - Static variable in class io.nats.client.ConnectionFactory
-
This property is defined as String "io.nats.client.name".
- PROP_CONNECTION_NAME - Static variable in class io.nats.client.Constants
-
- PROP_CONNECTION_TIMEOUT - Static variable in class io.nats.client.ConnectionFactory
-
This property is defined as String "io.nats.client.timeout".
- PROP_CONNECTION_TIMEOUT - Static variable in class io.nats.client.Constants
-
- PROP_DISCONNECTED_CB - Static variable in class io.nats.client.ConnectionFactory
-
This property is defined as String "io.nats.client.callback.disconnected".
- PROP_DISCONNECTED_CB - Static variable in class io.nats.client.Constants
-
- PROP_EXCEPTION_HANDLER - Static variable in class io.nats.client.ConnectionFactory
-
This property is defined as String "io.nats.client.callback.exception".
- PROP_EXCEPTION_HANDLER - Static variable in class io.nats.client.Constants
-
- PROP_HOST - Static variable in class io.nats.client.ConnectionFactory
-
This property is defined as String "io.nats.client.host".
- PROP_HOST - Static variable in class io.nats.client.Constants
-
- PROP_MAX_PINGS - Static variable in class io.nats.client.ConnectionFactory
-
This property is defined as String "io.nats.client.maxpings".
- PROP_MAX_PINGS - Static variable in class io.nats.client.Constants
-
- PROP_MAX_RECONNECT - Static variable in class io.nats.client.ConnectionFactory
-
This property is defined as String "io.nats.client.reconnect.max".
- PROP_MAX_RECONNECT - Static variable in class io.nats.client.Constants
-
- PROP_NORANDOMIZE - Static variable in class io.nats.client.ConnectionFactory
-
This property is defined as String "io.nats.client.norandomize".
- PROP_NORANDOMIZE - Static variable in class io.nats.client.Constants
-
- PROP_PASSWORD - Static variable in class io.nats.client.ConnectionFactory
-
This property is defined as String "io.nats.client.password".
- PROP_PASSWORD - Static variable in class io.nats.client.Constants
-
- PROP_PEDANTIC - Static variable in class io.nats.client.ConnectionFactory
-
This property is defined as String "io.nats.client.pedantic".
- PROP_PEDANTIC - Static variable in class io.nats.client.Constants
-
- PROP_PING_INTERVAL - Static variable in class io.nats.client.ConnectionFactory
-
This property is defined as String "io.nats.client.pinginterval".
- PROP_PING_INTERVAL - Static variable in class io.nats.client.Constants
-
- PROP_PORT - Static variable in class io.nats.client.ConnectionFactory
-
This property is defined as String "io.nats.client.port".
- PROP_PORT - Static variable in class io.nats.client.Constants
-
- PROP_RECONNECT_ALLOWED - Static variable in class io.nats.client.ConnectionFactory
-
This property is defined as String "io.nats.client.reconnect.allowed".
- PROP_RECONNECT_ALLOWED - Static variable in class io.nats.client.Constants
-
- PROP_RECONNECT_BUF_SIZE - Static variable in class io.nats.client.ConnectionFactory
-
This property is defined as String "io.nats.client.reconnect.buffer.size".
- PROP_RECONNECT_BUF_SIZE - Static variable in class io.nats.client.Constants
-
- PROP_RECONNECT_WAIT - Static variable in class io.nats.client.ConnectionFactory
-
This property is defined as String "io.nats.client.reconnect.wait".
- PROP_RECONNECT_WAIT - Static variable in class io.nats.client.Constants
-
- PROP_RECONNECTED_CB - Static variable in class io.nats.client.ConnectionFactory
-
This property is defined as String "io.nats.client.callback.reconnected".
- PROP_RECONNECTED_CB - Static variable in class io.nats.client.Constants
-
- PROP_SECURE - Static variable in class io.nats.client.ConnectionFactory
-
This property is defined as String "io.nats.client.secure".
- PROP_SECURE - Static variable in class io.nats.client.Constants
-
- PROP_SERVERS - Static variable in class io.nats.client.ConnectionFactory
-
This property is defined as String "io.nats.client.servers".
- PROP_SERVERS - Static variable in class io.nats.client.Constants
-
- PROP_TLS_DEBUG - Static variable in class io.nats.client.ConnectionFactory
-
This property is defined as String "io.nats.client.tls.debug".
- PROP_TLS_DEBUG - Static variable in class io.nats.client.Constants
-
- PROP_URL - Static variable in class io.nats.client.ConnectionFactory
-
This property is defined as String "io.nats.client.url".
- PROP_URL - Static variable in class io.nats.client.Constants
-
- PROP_USERNAME - Static variable in class io.nats.client.ConnectionFactory
-
This property is defined as String "io.nats.client.username".
- PROP_USERNAME - Static variable in class io.nats.client.Constants
-
- PROP_VERBOSE - Static variable in class io.nats.client.ConnectionFactory
-
This property is defined as String "io.nats.client.verbose".
- PROP_VERBOSE - Static variable in class io.nats.client.Constants
-
- publish(String, byte[]) - Method in interface io.nats.client.Connection
-
Publishes the payload specified by data
to the subject specified by subject
.
- publish(Message) - Method in interface io.nats.client.Connection
-
Publishes a message to a subject.
- publish(String, String, byte[]) - Method in interface io.nats.client.Connection
-
Publishes the payload specified by data
to the subject specified by subject
,
with an optional reply subject.
- publish(String, String, byte[], boolean) - Method in interface io.nats.client.Connection
-
Publishes the payload specified by data
to the subject specified by subject
,
with an optional reply subject.
- Sample - Class in io.nats.benchmark
-
- Sample() - Constructor for class io.nats.benchmark.Sample
-
- Sample(int, int, long, long, Connection) - Constructor for class io.nats.benchmark.Sample
-
Constructs a new benchmark sample.
- SampleGroup - Class in io.nats.benchmark
-
- seconds() - Method in class io.nats.benchmark.Sample
-
- setClosedCallback(ClosedCallback) - Method in class io.nats.client.ConnectionFactory
-
- setConnection(Connection) - Method in exception io.nats.client.NATSException
-
- setConnectionName(String) - Method in class io.nats.client.ConnectionFactory
-
Sets the name associated with this Connection
- setConnectionTimeout(int) - Method in class io.nats.client.ConnectionFactory
-
Sets the connection timeout interval in milliseconds.
- setData(byte[], int, int) - Method in class io.nats.client.Message
-
Sets the message payload data.
- setData(byte[]) - Method in class io.nats.client.Message
-
Sets the message payload data.
- setDisconnectedCallback(DisconnectedCallback) - Method in class io.nats.client.ConnectionFactory
-
- setExceptionHandler(ExceptionHandler) - Method in class io.nats.client.ConnectionFactory
-
- setHost(String) - Method in class io.nats.client.ConnectionFactory
-
Sets the default server host.
- setMaxPingsOut(int) - Method in class io.nats.client.ConnectionFactory
-
Sets the maximum number of outstanding pings (pings for which no pong has been received).
- setMaxReconnect(int) - Method in class io.nats.client.ConnectionFactory
-
Sets the maximum number of reconnection attempts for this connection.
- setMessageHandler(MessageHandler) - Method in interface io.nats.client.AsyncSubscription
-
- setNoRandomize(boolean) - Method in class io.nats.client.ConnectionFactory
-
Disables or enables server list randomization.
- setPassword(String) - Method in class io.nats.client.ConnectionFactory
-
Sets the default password.
- setPedantic(boolean) - Method in class io.nats.client.ConnectionFactory
-
Sets whether strict server-side protocol checking is enabled.
- setPendingLimits(int, int) - Method in interface io.nats.client.Subscription
-
Sets the maximum number of unprocessed messages and bytes that can be left pending on this
subscription before messages are dropped and a slow consumer exception is thrown.
- setPingInterval(long) - Method in class io.nats.client.ConnectionFactory
-
Sets the server ping interval in milliseconds.
- setPort(int) - Method in class io.nats.client.ConnectionFactory
-
Sets the default server port.
- setReconnectAllowed(boolean) - Method in class io.nats.client.ConnectionFactory
-
Sets whether reconnection is enabled.
- setReconnectBufSize(int) - Method in class io.nats.client.ConnectionFactory
-
Sets the maximum size in bytes of the pending message buffer, which is used to buffer
messages between a disconnect and subsequent reconnect.
- setReconnectedCallback(ReconnectedCallback) - Method in class io.nats.client.ConnectionFactory
-
- setReconnectWait(long) - Method in class io.nats.client.ConnectionFactory
-
Sets the reconnect wait interval in milliseconds.
- setReplyTo(String) - Method in class io.nats.client.Message
-
Sets the message reply subject.
- setSecure(boolean) - Method in class io.nats.client.ConnectionFactory
-
Sets whether to require a secure connection with the NATS server.
- setServers(List<URI>) - Method in class io.nats.client.ConnectionFactory
-
Sets the server list from a list of URI
.
- setServers(String) - Method in class io.nats.client.ConnectionFactory
-
Sets the server list from a comma-delimited list of server addresses in a single string.
- setServers(String[]) - Method in class io.nats.client.ConnectionFactory
-
Sets the server list from a list of String
.
- setSslContext(SSLContext) - Method in class io.nats.client.ConnectionFactory
-
- setSSLContext(SSLContext) - Method in class io.nats.client.ConnectionFactory
-
- setSubject(String) - Method in class io.nats.client.Message
-
Sets the subject of the message.
- setSubscription(Subscription) - Method in exception io.nats.client.NATSException
-
- setTlsDebug(boolean) - Method in class io.nats.client.ConnectionFactory
-
Sets whether TLS debug output should be enabled.
- setUri(URI) - Method in class io.nats.client.ConnectionFactory
-
Convenience function to set host, port, username, password from a java.net.URI.
- setUrl(String) - Method in class io.nats.client.ConnectionFactory
-
Sets the default server URL string.
- setUsername(String) - Method in class io.nats.client.ConnectionFactory
-
Sets the default username.
- setVerbose(boolean) - Method in class io.nats.client.ConnectionFactory
-
Sets whether verbose
is set.
- start() - Method in interface io.nats.client.AsyncSubscription
-
Deprecated.
- statistics() - Method in class io.nats.benchmark.SampleGroup
-
Formats the statistics for this group in a human-readable format.
- Statistics - Class in io.nats.client
-
- Statistics() - Constructor for class io.nats.client.Statistics
-
- stdDev() - Method in class io.nats.benchmark.SampleGroup
-
Returns the standard deviation of the message rates in the SampleGroup.
- Subscription - Interface in io.nats.client
-
A client uses a Subscription
object to receive messages that have been published to a
subject.
- SyncSubscription - Interface in io.nats.client
-
A client uses an SyncSubscription
object to receive messages from a subject
synchronously.