ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/experimental/server/Queue/Consumer.java
Revision: 1.1
Committed: Thu Dec 28 01:02:07 2000 UTC (23 years, 11 months ago) by tdb
Branch: MAIN
Log Message:
A 'consumer' for testing purposes. Takes a String from a Queue and prints it.

File Contents

# User Rev Content
1 tdb 1.1 class Consumer extends Thread {
2    
3     public Consumer(Queue queue) {
4     _queue = queue;
5     }
6    
7     public void run() {
8     while(true) {
9     try { Thread.sleep(1000); } catch(Exception e) {}
10     String s = (String) _queue.get();
11     System.out.println(s);
12     }
13     }
14    
15     private Queue _queue;
16    
17     }