This is a Java - Springboot application built and documented using Maven. To run this application you would need Java 11 JRE to be installed on the system.
The starter class is BoxOfficeApplication. To run this application on you system, import the project into your IDE as a Java-Maven project. Then Perform following actions:
- "Maven-> update project"
- "Run as -> Maven Install"
Your app should then be up and running.
This application randomly generates SoldTicketsInfo objects using SoldTicketsInfoSupplier and feeds it into a stream.
It has following consumers for the stream of SoldTicketsInfo objects.
- SoldTicketsInfoPrinterConsumer - Prints movie name asynchronously for "Gold" seat tickets
- MovieTotalTicketsCounterConsumer - Computes total tickets sold for a movie
It also has a listener attached to MovieTotalTicketsCounterConsumer, which would raise alters if "Total tickets count for a particular movie exceeds preset threshold value".
For further reference, please consider the following sections: