From the course: Java EE: Concurrency and Multithreading

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Define ReportProcessor

Define ReportProcessor

From the course: Java EE: Concurrency and Multithreading

Start my 1-month free trial

Define ReportProcessor

- [Instructor] Now let us create the ReportProcessor class. This is going to be a callable implementation, which is going to define the job of the task. The job of the task is to call the Dao, get the transaction information for every bank account, and then save that to a file. So let's go back to the IDE, and under the runables, I'm going to create that task. So let's call it ReportsProcessor. And that's going to implement callable. You could have also chosen runable, no problem with that. Let's make this this return a Boolean value. And of course, you have to implement the call method. Let's get rid of the default implementation. So this is how it is going to be for every bank account. We are going to dedicate one instance of this ReportProcessor task, right? So if you want to generate a report for one bank account, you are going to have one task of ReportProcessor submitted. That's how this is going to work. So on line number 16, I'm going to tie up this ReportsProcessor with a…

Contents