10.07.2015 Views

pdf - 395 K - Ecole des mines de Nantes

pdf - 395 K - Ecole des mines de Nantes

pdf - 395 K - Ecole des mines de Nantes

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Message received: interrupt preterminationphasetermConv.Close();idleStart = DateTime.Now;goto Step1;}// Answer from proxy receivedMessage answer = termConv.Reply;bool authorized = (answer.Subject ==Subjects.TerminationAccepted);if (authorized) goto Step3;else{// Add network latency time for waiting a bitmoreidleStart.Add(Middleware.MAX_LATENCY);goto Step1;}Step3: // TerminatingTerminate();return;Step4: // Handling user's navigationm = msgQueue.Dequeue();navig = (NavigationActContent) m.Content;UpdateProfile(navig);if (!msgQueue.IsEmpty) goto Step4;else goto Step5;}Step5: // BI generation initiationRequestBIGeneration();idleStart = DateTime.Now;goto Step1;// ****** Agent activities and transitions ******// Inform UserAgentProxy that this is readyprivate void NotifyProxy(){Message m = new Message(GetId(), proxy,Message.Natures.Inform,Subjects.UAReady);initConversation.SendAndClose(m);initConversation = null;}private void RequestBIGeneration(){AgentId generator =DirectoryFacilitator.GetDF().FindProvi<strong>de</strong>rOf(BIGeneratorAg.SERVICE);Debug.Assert(generator != null);Message m = new Message(GetId(), generator,Message.Natures.Request,Subjects.BIGeneration, userProfile);SendMessage(m);}private Conversation RequestTermination()MSc EMOOSE Thesis – http://www.emn.fr/EMOOSE 105

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!