|
My Project
|
Mocks an external data source (like an HTTP server) providing real-time transactions. More...


Public Member Functions | |
| IncomingTransactionsReader () | |
| Constructor for IncomingTransactionsReader. | |
| boolean | hasNext () |
| Checks if there are more transactions available in the stream. | |
| Transaction | next () |
| Retrieves the next available transaction. | |
Mocks an external data source (like an HTTP server) providing real-time transactions.
This class implements the Iterator interface. It reads transaction data from a resource file on the classpath, parses the content, and provides an interface to stream these transactions into the system for processing.
<Transaction>
| IncomingTransactionsReader.IncomingTransactionsReader | ( | ) |
Constructor for IncomingTransactionsReader.
Initializes the reader by loading all transactions from the specified text file into an internal list.
| boolean IncomingTransactionsReader.hasNext | ( | ) |
Checks if there are more transactions available in the stream.
| Transaction IncomingTransactionsReader.next | ( | ) |
Retrieves the next available transaction.