Last change
on this file since 95 was
95,
checked in by stoda, 11 years ago
|
Spawn, delete, spawn works fine
TODO: pool thread problem. Give one consumer to each thread or use a notification system
|
File size:
471 bytes
|
Line | |
---|
1 | package omq.test.supervisor; |
---|
2 | |
---|
3 | import omq.client.annotation.AsyncMethod; |
---|
4 | import omq.server.RemoteObject; |
---|
5 | |
---|
6 | public class SleepImpl extends RemoteObject implements Sleep { |
---|
7 | |
---|
8 | /** |
---|
9 | * |
---|
10 | */ |
---|
11 | private static final long serialVersionUID = 1L; |
---|
12 | |
---|
13 | @Override |
---|
14 | @AsyncMethod |
---|
15 | public void sleep() { |
---|
16 | try { |
---|
17 | System.out.println("I'm going to sleep!!!!!!!!" + Thread.currentThread().getId()); |
---|
18 | Thread.sleep(1000); |
---|
19 | } catch (InterruptedException e) { |
---|
20 | e.printStackTrace(); |
---|
21 | } |
---|
22 | } |
---|
23 | |
---|
24 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.