public class StreamingListener extends Object implements NatsMessageListener
| Constructor and Description |
|---|
StreamingListener(String subject,
NatsInjectHandler injectHandler,
Properties natsProperties) |
| Modifier and Type | Method and Description |
|---|---|
void |
closeConnection()
Close the connection to NATS Streaming server and set connection to null.
|
boolean |
createConnection()
Create the connection to the NATS Streaming server.
|
void |
initializeConsumer(String sequenceName)
Consume the message received and inject into the sequence.
|
public StreamingListener(String subject, NatsInjectHandler injectHandler, Properties natsProperties)
public boolean createConnection()
throws IOException,
InterruptedException
createConnection in interface NatsMessageListenerIOExceptionInterruptedExceptionpublic void initializeConsumer(String sequenceName) throws InterruptedException, IOException, TimeoutException
initializeConsumer in interface NatsMessageListenersequenceName - the sequence to inject the message to.InterruptedExceptionIOExceptionTimeoutExceptionpublic void closeConnection()
closeConnection in interface NatsMessageListenerCopyright © 2021 WSO2. All rights reserved.