Join Ketkee Aryamane for an in-depth discussion in this video Add a REST method to call the URLProcessor, part of Java EE: Concurrency and Multithreading.
- [Instructor] So now let's go ahead and do the last step.…You have to add a method to the REST class,…get that scheduled executer service object…that we've already injected.…And submit the task for scheduling of the URL health check.…Let's go ahead on the IDE…and we've already added that REST class.…We just need to go ahead and add a REST method to it.…So let's get hold of the resource first.…Yes.…And here we will just add a @GET API.…
And what is it going to do?…It is going to say…public String checkHealthOf the app.…Okay, so what is this going to do?…Let's have a string message.…Okay, and let's go ahead and take…the scheduledExecutorService object now, grab that,…and go ahead and call the schedule API.…
Okay, so this will take in three arguments:…One is the instance of the URLHealthProcessor.…So let's feed the instance to it.…The initial delay, let's say is three seconds only.…TimeUnit is seconds, of course,…and as I said, you may want to actually schedule…this health check maybe after certain minutes…or certain days or whatever that is,…
- What is concurrency?
- Processes and threads in Java SE
- Java EE concurrency APIs
- Working with the ManagedExecutorService, ManagedScheduledExecutorService, ManagedThreadFactory, and ContextService APIs
- Defining data access object (DAO) classes
- Adding methods to DAO classes
- Writing REST classes
- Creating custom thread factories
- Creating contextual proxies
- JTA transactions and concurrency
Skill Level Intermediate
Java EE: Contexts and Dependency Injectionwith Alex Theedom1h 43m Intermediate
Java EE: Design Patterns and Architecturewith Alex Theedom2h 44m Intermediate
Java EE: Servlets and JavaServer Pages (JSP)with Ketkee Aryamane6h 14m Intermediate
1. Overview and Setup
2. Processes and Threads
3. Executor API
4. Java EE Concurrency APIs
5. Concurrency and Transactions
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.