public interface ExceptionHandler
Connection
object, it informs the
Connection
object's ExceptionHandler
, if one has been registered. It does this by
calling the listener's onException
method, passing it a NATSException argument describing
the problem.
An exception handler allows a client to be notified of a problem asynchronously. Some connections only consume messages asynchronously, so they would have no other way to learn that their connection has failed.
AbstractConnection.setExceptionHandler(ExceptionHandler)
,
ConnectionFactory.setExceptionHandler(ExceptionHandler)
Modifier and Type | Method and Description |
---|---|
void |
onException(NATSException ex)
Notify user of a NATS exception.
|
void onException(NATSException ex)
ex
- a NATSException
, wrapping the original event along with other metadataCopyright © 2015–2016 Apcera, Inc.. All rights reserved.