From the course: Java EE: Concurrency and Multithreading
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Define ReportProcessor
From the course: Java EE: Concurrency and Multithreading
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
Need for Java EE concurrency4m 14s
-
(Locked)
Java EE concurrency APIs3m 52s
-
(Locked)
Set up a Java EE RESTful application8m 4s
-
(Locked)
Running and testing the Java EE RESTful application4m 47s
-
(Locked)
Important Java EE terms4m 4s
-
(Locked)
ManagedExecutorService (MES) overview3m 20s
-
(Locked)
Define the bank account related beans and DAO class3m 28s
-
(Locked)
Add methods in the DAO class10m 30s
-
(Locked)
Define ReportProcessor7m 42s
-
(Locked)
Write REST class for injecting MES objects6m 51s
-
(Locked)
Verify code and add the REST method8m 42s
-
(Locked)
Run and test the ManagedExecutorService application2m 59s
-
(Locked)
ManagedScheduledExecutorService overview2m 22s
-
(Locked)
Defining the URLProcessor for the thread's job6m 47s
-
(Locked)
Add a REST method to call the URLProcessor5m 20s
-
(Locked)
Important pointers and API overview6m 22s
-
(Locked)
ManagedThreadFactory API1m 26s
-
(Locked)
Create a single thread with ManagedThreadFactory6m 7s
-
(Locked)
ManagedThreadFactory with ThreadPoolExecutor7m 2s
-
(Locked)
ContextService API3m 7s
-
(Locked)
Create a contextual proxy9m 15s
-
-
-