001    // GraphLab Project: http://graphlab.sharif.edu
002    // Copyright (C) 2008 Mathematical Science Department of Sharif University of Technology
003    // Distributed under the terms of the GNU Lesser General Public License (LGPL): http://www.gnu.org/licenses/
004    
005    /**
006     *
007     */
008    package graphlab.library.event;
009    
010    
011    /**
012     * @author Omid
013     */
014    public class MessageEvent implements Event {
015    
016        public boolean isNotification;
017        public long durationShowTime;
018    
019        public MessageEvent(String message, boolean notification, long durationShowTime) {
020            this.message = message;
021            isNotification = notification;
022            this.durationShowTime = durationShowTime;
023        }
024    
025        public MessageEvent(String message) {
026            this.message = message;
027            isNotification = false;
028            this.durationShowTime = 0;
029    
030        }
031    
032        public String getDescription() {
033            return "Sends a message to the dispatcher";
034        }
035    
036        private String message;
037    
038        public String getMessage() {
039            return message;
040        }
041    
042        public void setMessage(String message) {
043            this.message = message;
044        }
045    
046        public String getID() {
047            return "Message Event";
048        }
049    }