My Project
Loading...
Searching...
No Matches
Public Member Functions | List of all members
IncomingTransactionsReader Class Reference

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

Inheritance diagram for IncomingTransactionsReader:
Inheritance graph
[legend]
Collaboration diagram for IncomingTransactionsReader:
Collaboration graph
[legend]

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.
 

Detailed Description

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>

Constructor & Destructor Documentation

◆ IncomingTransactionsReader()

IncomingTransactionsReader.IncomingTransactionsReader ( )

Constructor for IncomingTransactionsReader.

Initializes the reader by loading all transactions from the specified text file into an internal list.

Member Function Documentation

◆ hasNext()

boolean IncomingTransactionsReader.hasNext ( )

Checks if there are more transactions available in the stream.

Returns
boolean True if another transaction exists, false otherwise.

◆ next()

Transaction IncomingTransactionsReader.next ( )

Retrieves the next available transaction.

Returns
Transaction The next transaction in the sequence.

The documentation for this class was generated from the following file: