00001 /* 00002 * Event.hpp 00003 * 00004 * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. 00005 * 00006 * Oracle is a registered trademarks of Oracle Corporation and/or its 00007 * affiliates. 00008 * 00009 * This software is the confidential and proprietary information of Oracle 00010 * Corporation. You shall not disclose such confidential and proprietary 00011 * information and shall use it only in accordance with the terms of the 00012 * license agreement you entered into with Oracle. 00013 * 00014 * This notice may not be removed or altered. 00015 */ 00016 #ifndef COH_EVENT_HPP 00017 #define COH_EVENT_HPP 00018 00019 #include "coherence/lang.ns" 00020 00021 00022 00023 COH_OPEN_NAMESPACE2(coherence,util) 00024 00025 00026 /** 00027 * The root class from which all event state classes shall be derived. 00028 * <p> 00029 * All Events are constructed with a reference to the object, the "source", 00030 * that is logically deemed to be the object upon which the Event in question 00031 * initially occurred. 00032 * 00033 * @author jh 2007.12.12 00034 */ 00035 class COH_EXPORT Event 00036 : public class_spec<Event> 00037 { 00038 friend class factory<Event>; 00039 00040 // ----- constructors --------------------------------------------------- 00041 00042 protected: 00043 /** 00044 * Create a new Event instance. 00045 * 00046 * @param vSource the source associated with the new Event 00047 * 00048 * @return a new Event 00049 */ 00050 Event(Object::View vSource); 00051 00052 private: 00053 /** 00054 * Blocked copy constructor. 00055 */ 00056 Event(const Event&); 00057 00058 00059 // ----- Object interface ----------------------------------------------- 00060 00061 public: 00062 /** 00063 * {@inheritDoc} 00064 */ 00065 virtual TypedHandle<const String> toString() const; 00066 00067 00068 // ----- accessors ------------------------------------------------------ 00069 00070 public: 00071 /** 00072 * Return the object on which the Event initially occurred. 00073 * 00074 * @return the object on which the Event initially occurred 00075 */ 00076 virtual Object::View getSource() const; 00077 00078 00079 // ----- data members --------------------------------------------------- 00080 00081 protected: 00082 /** 00083 * The object on which the Event initially occurred. 00084 */ 00085 FinalView<Object> f_vSource; 00086 }; 00087 00088 COH_CLOSE_NAMESPACE2 00089 00090 #endif // COH_EVENT_HPP