- clear() - Method in class io.nats.client.NKey
-
Clear the seed and public key char arrays by filling them
with random bytes then zero-ing them out.
- clearDroppedCount() - Method in interface io.nats.client.Consumer
-
Reset the drop count to 0.
- CLIENT_LANGUAGE - Static variable in class io.nats.client.Nats
-
Current language of the library - "java"
- CLIENT_VERSION - Static variable in class io.nats.client.Nats
-
Current version of the library - "2.6.8"
- close() - Method in interface io.nats.client.Connection
-
- closeDispatcher(Dispatcher) - Method in interface io.nats.client.Connection
-
Close a dispatcher.
- connect() - Static method in class io.nats.client.Nats
-
- connect(String) - Static method in class io.nats.client.Nats
-
The Java client generally expects URLs of the form nats://hostname:port
- connect(Options) - Static method in class io.nats.client.Nats
-
Options can be used to set the server URL, or multiple URLS, callback
handlers for various errors, and connection events.
- connectAsynchronously(Options, boolean) - Static method in class io.nats.client.Nats
-
Try to connect in another thread, a connection listener is required to get
the connection.
- Connection - Interface in io.nats.client
-
The Connection class is at the heart of the NATS Java client.
- Connection.Status - Enum in io.nats.client
-
- connectionEvent(Connection, ConnectionListener.Events) - Method in interface io.nats.client.ConnectionListener
-
Connection related events that occur asynchronously in the client code are
sent to a ConnectionListener via a single method.
- ConnectionListener - Interface in io.nats.client
-
Applications can use a ConnectionListener to track the status of a
Connection
.
- connectionListener(ConnectionListener) - Method in class io.nats.client.Options.Builder
-
- ConnectionListener.Events - Enum in io.nats.client
-
- connectionName(String) - Method in class io.nats.client.Options.Builder
-
Set the connection's optional Name.
- connectionTimeout(Duration) - Method in class io.nats.client.Options.Builder
-
Set the timeout for connection attempts.
- Consumer - Interface in io.nats.client
-
A Consumer in the NATS library is an object that represents an incoming queue of
messages.
- createAccount(SecureRandom) - Static method in class io.nats.client.NKey
-
Create an Account NKey from the provided random number generator.
- createCluster(SecureRandom) - Static method in class io.nats.client.NKey
-
Create an Cluster NKey from the provided random number generator.
- createDispatcher(MessageHandler) - Method in interface io.nats.client.Connection
-
Create a Dispatcher
for this connection.
- createInbox() - Method in interface io.nats.client.Connection
-
- createOperator(SecureRandom) - Static method in class io.nats.client.NKey
-
Create an Operator NKey from the provided random number generator.
- createServer(SecureRandom) - Static method in class io.nats.client.NKey
-
Create a Server NKey from the provided random number generator.
- createURIForServer(String) - Method in class io.nats.client.Options
-
- createUser(SecureRandom) - Static method in class io.nats.client.NKey
-
Create a User NKey from the provided random number generator.
- credentials(String) - Static method in class io.nats.client.Nats
-
Create an authhandler from a creds file.
- credentials(String, String) - Static method in class io.nats.client.Nats
-
Create an authhandler from a jwt file and an nkey file.
- dataPortType(String) - Method in class io.nats.client.Options.Builder
-
The class to use for this connections data port.
- DEFAULT_BUFFER_SIZE - Static variable in class io.nats.client.Options
-
Default size for buffers in the connection, not as available as other settings,
this is primarily changed for testing,
getBufferSize()
.
- DEFAULT_CONNECTION_TIMEOUT - Static variable in class io.nats.client.Options
-
- DEFAULT_DATA_PORT_TYPE - Static variable in class io.nats.client.Options
-
- DEFAULT_DISCARD_MESSAGES_WHEN_OUTGOING_QUEUE_FULL - Static variable in class io.nats.client.Options
-
This value is used internally to discard messages when the outgoing queue is full.
- DEFAULT_INBOX_PREFIX - Static variable in class io.nats.client.Options
-
Default prefix used for inboxes, you can change this to manage authorization of subjects.
- DEFAULT_MAX_BYTES - Static variable in interface io.nats.client.Consumer
-
The default number of bytes a consumer will hold before it starts to drop messages.
- DEFAULT_MAX_CONTROL_LINE - Static variable in class io.nats.client.Options
-
The default length, 1024 bytes, the client will allow in an
outgoing protocol control line,
getMaxControlLine()
.
- DEFAULT_MAX_MESSAGES - Static variable in interface io.nats.client.Consumer
-
The default number of messages a consumer will hold before it starts to drop them.
- DEFAULT_MAX_MESSAGES_IN_OUTGOING_QUEUE - Static variable in class io.nats.client.Options
-
This value is used internally to limit the number of messages allowed in the outgoing queue.
- DEFAULT_MAX_PINGS_OUT - Static variable in class io.nats.client.Options
-
Default maximum number of pings have not received a response allowed by the
client,
getMaxPingsOut()
.
- DEFAULT_MAX_RECONNECT - Static variable in class io.nats.client.Options
-
- DEFAULT_PING_INTERVAL - Static variable in class io.nats.client.Options
-
Default server ping interval.
- DEFAULT_PORT - Static variable in class io.nats.client.Options
-
Default server port.
- DEFAULT_RECONNECT_BUF_SIZE - Static variable in class io.nats.client.Options
-
Default of pending message buffer that is used for buffering messages that
are published during a disconnect/reconnect,
getReconnectBufferSize()
.
- DEFAULT_RECONNECT_WAIT - Static variable in class io.nats.client.Options
-
Default wait time before attempting reconnection to the same server, see
getReconnectWait()
.
- DEFAULT_REQUEST_CLEANUP_INTERVAL - Static variable in class io.nats.client.Options
-
Default interval to clean up cancelled/timed out requests.
- DEFAULT_SSL_PROTOCOL - Static variable in class io.nats.client.Options
-
Default SSL protocol used to create an SSLContext if the
secure property
is used.
- DEFAULT_THREAD_NAME_PREFIX - Static variable in class io.nats.client.Options
-
Default thread name prefix.
- DEFAULT_URL - Static variable in class io.nats.client.Options
-
Default server URL.
- discardMessagesWhenOutgoingQueueFull() - Method in class io.nats.client.Options.Builder
-
Enable discard messages when the outgoing queue full.
- Dispatcher - Interface in io.nats.client
-
This library uses the concept of a Dispatcher to organize message callbacks in a way that the
application can control.
- drain(Duration) - Method in interface io.nats.client.Connection
-
Drain tells the connection to process in flight messages before closing.
- drain(Duration) - Method in interface io.nats.client.Consumer
-
Drain tells the consumer to process in flight, or cached messages, but stop receiving new ones.
- pedantic() - Method in class io.nats.client.Options.Builder
-
Turn on pedantic mode for the server, in relation to this connection.
- pingInterval(Duration) - Method in class io.nats.client.Options.Builder
-
Set the interval between attempts to pings the server.
- PROP_CLEANUP_INTERVAL - Static variable in class io.nats.client.Options
-
Property used to configure a builder from a Properties object.
- PROP_CONNECTION_CB - Static variable in class io.nats.client.Options
-
Property used to configure a builder from a Properties object.
- PROP_CONNECTION_NAME - Static variable in class io.nats.client.Options
-
Property used to configure a builder from a Properties object.
- PROP_CONNECTION_TIMEOUT - Static variable in class io.nats.client.Options
-
Property used to configure a builder from a Properties object.
- PROP_DATA_PORT_TYPE - Static variable in class io.nats.client.Options
-
Property used to configure a builder from a Properties object.
- PROP_DISCARD_MESSAGES_WHEN_OUTGOING_QUEUE_FULL - Static variable in class io.nats.client.Options
-
Property used to configure a builder from a Properties object.
- PROP_ERROR_LISTENER - Static variable in class io.nats.client.Options
-
Property used to configure a builder from a Properties object.
- PROP_INBOX_PREFIX - Static variable in class io.nats.client.Options
-
Property used to set the inbox prefix
- PROP_MAX_CONTROL_LINE - Static variable in class io.nats.client.Options
-
Property used to configure a builder from a Properties object.
- PROP_MAX_MESSAGES_IN_OUTGOING_QUEUE - Static variable in class io.nats.client.Options
-
Property used to configure a builder from a Properties object.
- PROP_MAX_PINGS - Static variable in class io.nats.client.Options
-
Property used to configure a builder from a Properties object.
- PROP_MAX_RECONNECT - Static variable in class io.nats.client.Options
-
Property used to configure a builder from a Properties object.
- PROP_NO_ECHO - Static variable in class io.nats.client.Options
-
Property used to configure a builder from a Properties object.
- PROP_NORANDOMIZE - Static variable in class io.nats.client.Options
-
Property used to configure a builder from a Properties object.
- PROP_OPENTLS - Static variable in class io.nats.client.Options
-
Property used to configure a builder from a Properties object.
- PROP_PASSWORD - Static variable in class io.nats.client.Options
-
Property used to configure a builder from a Properties object.
- PROP_PEDANTIC - Static variable in class io.nats.client.Options
-
Property used to configure a builder from a Properties object.
- PROP_PING_INTERVAL - Static variable in class io.nats.client.Options
-
Property used to configure a builder from a Properties object.
- PROP_RECONNECT_BUF_SIZE - Static variable in class io.nats.client.Options
-
Property used to configure a builder from a Properties object.
- PROP_RECONNECT_WAIT - Static variable in class io.nats.client.Options
-
Property used to configure a builder from a Properties object.
- PROP_SECURE - Static variable in class io.nats.client.Options
-
Property used to configure a builder from a Properties object.
- PROP_SERVERS - Static variable in class io.nats.client.Options
-
Property used to configure a builder from a Properties object.
- PROP_TOKEN - Static variable in class io.nats.client.Options
-
Property used to configure a builder from a Properties object.
- PROP_URL - Static variable in class io.nats.client.Options
-
Property used to configure a builder from a Properties object.
- PROP_USE_OLD_REQUEST_STYLE - Static variable in class io.nats.client.Options
-
Property used to configure a builder from a Properties object.
- PROP_USERNAME - Static variable in class io.nats.client.Options
-
Property used to configure a builder from a Properties object.
- PROP_UTF8_SUBJECTS - Static variable in class io.nats.client.Options
-
This property is used to enable support for UTF8 subjects.
- PROP_VERBOSE - Static variable in class io.nats.client.Options
-
Property used to configure a builder from a Properties object.
- publish(String, byte[]) - Method in interface io.nats.client.Connection
-
Send a message to the specified subject.
- publish(String, String, byte[]) - Method in interface io.nats.client.Connection
-
Send a request to the specified subject, providing a replyTo subject.
- secure() - Method in class io.nats.client.Options.Builder
-
Sets the options to use the default SSL Context, if it exists.
- server(String) - Method in class io.nats.client.Options.Builder
-
Add a server to the list of known servers.
- servers(String[]) - Method in class io.nats.client.Options.Builder
-
Add an array of servers to the list of known servers.
- setPendingLimits(long, long) - Method in interface io.nats.client.Consumer
-
Set limits on the maximum number of messages, or maximum size of messages this consumer
will hold before it starts to drop new messages waiting for the application to drain the queue.
- sign(byte[]) - Method in interface io.nats.client.AuthHandler
-
Sign is called by the library when the server sends a nonce.
- sign(byte[]) - Method in class io.nats.client.NKey
-
Sign aribitrary binary input.
- slowConsumerDetected(Connection, Consumer) - Method in interface io.nats.client.ErrorListener
-
Called by the connection when a "slow" consumer is detected.
- sslContext(SSLContext) - Method in class io.nats.client.Options.Builder
-
Set the SSL context, requires that the server supports TLS connections and
the URI specifies TLS.
- staticCredentials(char[], char[]) - Static method in class io.nats.client.Nats
-
Create an auth handler from an nkey and an option JWT.
- Statistics - Interface in io.nats.client
-
- subscribe(String) - Method in interface io.nats.client.Connection
-
Create a synchronous subscription to the specified subject.
- subscribe(String, String) - Method in interface io.nats.client.Connection
-
Create a synchronous subscription to the specified subject and queue.
- subscribe(String) - Method in interface io.nats.client.Dispatcher
-
Create a subscription to the specified subject under the control of this
dispatcher.
- subscribe(String, String) - Method in interface io.nats.client.Dispatcher
-
Create a subscription to the specified subject and queue under the control of
this dispatcher.
- subscribe(String, MessageHandler) - Method in interface io.nats.client.Dispatcher
-
Create a subscription to the specified subject under the control of this
dispatcher.
- subscribe(String, String, MessageHandler) - Method in interface io.nats.client.Dispatcher
-
Create a subscription to the specified subject under the control of this
dispatcher.
- Subscription - Interface in io.nats.client
-
A Subscription encapsulates an incoming queue of messages associated with a single
subject and optional queue name.
- supportUTF8Subjects() - Method in class io.nats.client.Options.Builder
-
The client protocol is not clear about the encoding for subject names.
- supportUTF8Subjects() - Method in class io.nats.client.Options
-