public interface NATSConnectorPlugin
The order of calls are:
onStartup
onNatsIntialized
During operation: onNatsMessage and onNATSEvent
onShutdown
| Modifier and Type | Method and Description |
|---|---|
void |
onNATSEvent(NATSEvent event,
String message)
Invoked anytime a NATS event occurs around a connection
or error, alerting the plugin to take appropriate action.
|
boolean |
onNatsInitialized(NATSConnector connector)
Invoked after startup, when the NATS plug-in has connectivity to the
NATS cluster, and is ready to start sending and
and receiving messages.
|
void |
onNATSMessage(io.nats.client.Message msg)
Invoked anytime a NATS message is received to be processed.
|
void |
onShutdown()
Invoked when the Plugin is shutting down.
|
boolean |
onStartup(org.slf4j.Logger logger,
io.nats.client.ConnectionFactory factory)
Invoked when the connector is started up, before a connection
to the NATS cluster is made.
|
boolean onStartup(org.slf4j.Logger logger,
io.nats.client.ConnectionFactory factory)
logger - - logger for the NATS connector process.factory - - the NATS connection factory.boolean onNatsInitialized(NATSConnector connector)
connector - interface to the NATS connectorvoid onNATSMessage(io.nats.client.Message msg)
msg - - NATS message received.void onNATSEvent(NATSEvent event, String message)
event - the type of eventmessage - a string describing the eventvoid onShutdown()
Copyright © 2015–2016 Apcera, Inc.. All rights reserved.