1 #include "DreamMaster.hpp"
\r
2 #include "LazyGuy.hpp"
\r
4 #include <HostNotFoundException.hpp>
\r
10 MSG_IMPLEMENT_DYNAMIC(DreamMaster, Process);
\r
12 int DreamMaster::main(int argc, char** argv)
\r
15 cout <<"[" << getName() << ":" << getHost().getName() << "] " << "Hello I'm " << getName() << " on " << getHost().getName() << "!" << endl;
\r
17 cout <<"[" << getName() << ":" << getHost().getName() << "] " << "Let's create a lazy guy.";
\r
24 Host currentHost = Host::currentHost();
\r
26 cout <<"[" << getName() << ":" << getHost().getName() << "] " << "Current host name : " << currentHost.getName() << endl;
\r
28 lazy = new LazyGuy(currentHost,"LazyGuy");
\r
30 cout <<"[" << getName() << ":" << getHost().getName() << "] " << "Let's wait a little bit..." << endl;
\r
32 Process::sleep(10.0);
\r
34 cout <<"[" << getName() << ":" << getHost().getName() << "] " << "Let's wake the lazy guy up! >:) " << endl;
\r
40 catch(HostNotFoundException e)
\r
42 cerr << e.toString() <<". Stopping Now!" << endl;
\r
46 //lazy->migrate(currentHost);
\r
48 cout <<"[" << getName() << ":" << getHost().getName() << "] " << "OK, goodbye now." << endl;
\r