Interface MessageReceiver
- All Known Implementing Classes:
SolaceMessageReceiver
public interface MessageReceiver
Interface for receiving messages from a Solace broker.
Implementations of this interface are responsible for managing the connection to the broker and for receiving messages from the broker.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes the message receiver.default boolean
isEOF()
Test clients may return true to signal that all expected messages have been pulled and the test may complete.receive()
Receives a message from the broker.void
start()
Starts the message receiver.
-
Method Details
-
start
void start()Starts the message receiver.This method is called in the
UnboundedSource.UnboundedReader.start()
method. -
receive
Receives a message from the broker.This method will block until a message is received.
- Throws:
IOException
-
close
void close()Closes the message receiver. -
isEOF
default boolean isEOF()Test clients may return true to signal that all expected messages have been pulled and the test may complete. Real clients should always return false.
-