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.

}msgQueue.AddFilters(new MessageCategory[] {UACreation});}protected overri<strong>de</strong> void Execute(){while (true){while (msgQueue.IsEmpty);Message m = msgQueue.Dequeue();new AgentMakingActivity(this, m).Start();}}class AgentMakingActivity : Activity{private Message requestMessage;base(agent)public AgentMakingActivity(Agent agent, Message request) :{requestMessage = request;}}}public overri<strong>de</strong> void Execute(){UserId userId = (UserId) requestMessage.Content;Conversation conversation = requestMessage.Conversation;// CALL TO DBMANAGER HEREnew UserAg(userId, conversation);}18. Class Architecture.UserAg – User Agentusing System;using MAP;using Architecture.Profiles;using System.Diagnostics;namespace Architecture{/// /// User Agent class./// public class UserAg : Agent{// Threshold timespan after which this terminates if notnotified of any// user navigation actpublic static TimeSpan STOP_THRESHOLD = new TimeSpan(0, 30, 0);// ID of user managed and UPprivate UserId user;private UP userProfile;// UserAgent and No<strong>de</strong>Agent Proxy IDsprivate AgentId proxy;// Message filterprivate MessageCategory Navigation = new MessageCategory(MSc EMOOSE Thesis – http://www.emn.fr/EMOOSE 103

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

Saved successfully!

Ooh no, something went wrong!