Thursday, 26th April 2012
Follow WikiJava on twitter now. @Wikijava

batBot:Requests in multiple threads

From WikiJava

Jump to: navigation, search

batBot:requests in multiple threads The requests must be conducted in multiple threads

Contents

description

There must be created a specific thread per each request, to simplify the management of each request.

Manager

User:DonGiulio is the manager for this requirement. Send DonGiulio an email

Features under Development

feature: Create and run the threads

Generate a thread per each request, run the threads, and manage synchronization between threads.

task: create ThreadedRequest object

Create the ThreadedRequest Class.

The Class ThreadedRequest encapsulates a Request object and implements the runnable interface. when it's Running it will execute all the tasks related to a single request.

Note that the method accessing the internet connection must be synchronized, as we don't want to mess up with the access to the resource.

skills required:

  • java
  • multithreading

Image:Ok.png --DonGiulio 18:11, 16 December 2008 (UTC)

task: create a thread

Generate a thread per some of the requests. Don't run the threads just create them and save them in separate objects.

skills required:

  • java
  • multithreading

Image:Ok.png --DonGiulio 19:24, 16 December 2008 (UTC)

task: execute a Thread

run the threads generated in the create a thread task.

skills required:

  • java
  • multithreading

Image:Ok.png --DonGiulio 19:26, 16 December 2008 (UTC)

feature: Generate List of Threads

all the threads created are listed in a list of threads the list of threads contains a timing value which tells when the thread has to be run. We want also to manage the running of the threads in the list. (don't mind the timing, just run them in order)

task: Create Threads List

Generate a thread per each request don't run the threads just create them and save them in a

List<ThreadedRequest> threadedRequests

object.

skills required:

  • collections

Image:Ok.png --DonGiulio 19:26, 16 December 2008 (UTC)

task: Execute Threads List

Run all the threads in the order given in the threadedRequests object

skills required:

  • collections

Image:Ok.png --DonGiulio 19:26, 16 December 2008 (UTC)

See also