public interface NonBlockingClientListener<T>
NonBlockingClient
Modifier and Type | Method and Description |
---|---|
void |
onDrain(NonBlockingClient client,
T context)
Called as a notification when the client has flushed any buffered messages to the network.
|
void |
onRestarted(NonBlockingClient client,
T context)
Called as a notification when the client transitions into restarting state.
|
void |
onRetrying(NonBlockingClient client,
T context,
ClientException exception)
Called as a notification when the client transitions into retrying state.
|
void |
onStarted(NonBlockingClient client,
T context)
Called as a notification when the client transitions into started state.
|
void |
onStopped(NonBlockingClient client,
T context,
ClientException exception)
Called as a notification when the client transitions into stopped state.
|
void onStarted(NonBlockingClient client, T context)
client
- a reference to the client that the listener was registered for and
this notification pertains to.context
- the context object that was specified when the listener was registered.void onStopped(NonBlockingClient client, T context, ClientException exception)
client
- a reference to the client that the listener was registered for and
this notification pertains to.context
- the context object that was specified when the listener was registered.exception
- indicates why the client transitioned into stopped state. This will be
null
when the client transitions into stopped state because
the stop()
method is called on the client.
This exception can be one of the following client type exceptions:
NetworkException
indicates a non-recoverable network type error.SecurityException
indicates a security related error.ReplacedException
indicates that the client has been replaced by another instance
of itself.ClientException
a general client type exception, usually caused by another
exception.void onRestarted(NonBlockingClient client, T context)
client
- a reference to the client that the listener was registered for and
this notification pertains to.context
- the context object that was specified when the listener was registered.void onRetrying(NonBlockingClient client, T context, ClientException exception)
client
- a reference to the client that the listener was registered for and
this notification pertains to.context
- the context object that was specified when the listener was registered.exception
- indicates why the client transitioned (or remains) in the retrying state.
This exception can be one of the following client type exceptions:
NetworkException
indicates a network type error.ClientException
a general client type exception, usually caused by another exception.void onDrain(NonBlockingClient client, T context)
NonBlockingClient.send(java.lang.String, java.lang.String, java.util.Map<java.lang.String, java.lang.Object>, com.ibm.mqlight.api.SendOptions, com.ibm.mqlight.api.CompletionListener<T>, T)
method to efficiently
send messages without buffering a large number of messages in memory allocated by the client.client
- a reference to the client that the listener was registered for and this notification pertains to.context
- the context object that was specified when the listener was registered.Copyright © 2015 International Business Machines Corporation. All rights reserved.