Title: Deamon Threads

Area: Java threads

A summary presentation about Deamon Threads

pdf

Thread programming Example 1: (Santa and the North Pole)

Area: Java threads

Written in Java

(Documentation and source code attached)

Multi-threaded program program that implements the work life at the North Pole.
When Santa checks the workList and there is no work, he waits (blocks) until some work is created and added to the workList. To wake Santa up, the UI thread needs to do a notify each time work gets added to the workList.

pdf

zip

Thread programming Example 2: (Web page characters count)

Area: Java threads

Written in Java

(Documentation and source code attached)

  • A worker thread fills an array passed by the manager with the first 1000 fibonacci number
  • A main class launches the worker thread

zip

Server-Client Example 1: (Joke Server)

Area: Java sockets

Written in Java

(Documentation and source code attached)

  • Client
  • Make connection to server socket
  • Read the Joke from the socket
  • Close the socket connection
  • Server
  • Listen for connections
  • Generate random joke
  • Write joke to socket
  • Close socket

zip

Server-Client Example 2: (Web page characters count)

Area: Java sockets and threads

Written in Java

(Documentation and source code attached)

  • Client
  • Make connection to server socket
  • Send a set of collected URLs to the server
  • Server
  • A worker thread connects to each url and counts the number of characters from that url.

zip

Page tags