Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
225e6f6c1b01c2e596c48c64c039a05bb9273b28
[simgrid.git] / examples / java / suspend / LazyGuy.java
1 /*
2  * $Id$
3  *
4  * Copyright 2006,2007 Martin Quinson, Malek Cherier         
5  * All rights reserved. 
6  *
7  * This program is free software; you can redistribute it and/or modify it
8  * under the terms of the license (GNU LGPL) which comes with this package. 
9  */
10
11 import simgrid.msg.*;
12
13 public class LazyGuy extends simgrid.msg.Process {
14         
15         
16         public LazyGuy() {
17         super();
18     }
19     
20      public LazyGuy(Host host,String name) 
21      throws NullPointerException, HostNotFoundException, JniException, NativeException
22      {
23                 super(host,name,null);
24         }
25         
26          
27     public void main(String[] args) throws JniException, NativeException {
28        Msg.info("Hello !");
29         
30        Msg.info("Nobody's watching me ? Let's go to sleep.");
31        simgrid.msg.Process.currentProcess().pause();
32                 
33        Msg.info("Uuuh ? Did somebody call me ?");
34        Msg.info("Mmmh, goodbye now."); 
35     }
36 }