00001 /* 00002 * Copyright 2003 Michael A. Marsh, Cornell University. All rights reserved. 00003 * This software is released under the modified BSD license. 00004 * See the file LICENSE in the top-level directory for details. 00005 */ 00006 // 00007 // $Id: BroadcastRequestEvent.h,v 1.4 2005/01/21 19:44:17 mmarsh Exp $ 00008 // 00009 // $Log: BroadcastRequestEvent.h,v $ 00010 // Revision 1.4 2005/01/21 19:44:17 mmarsh 00011 // Updated for compatibility with Doxygen 1.4.1 00012 // 00013 // Revision 1.3 2004/05/19 15:56:57 mmarsh 00014 // *** empty log message *** 00015 // 00016 // Revision 1.2 2003/11/04 22:31:50 mmarsh 00017 // *** empty log message *** 00018 // 00019 // 00020 00021 #ifndef __CODEX_SERVER_BROADCASTREQUESTEVENT_H__ 00022 #define __CODEX_SERVER_BROADCASTREQUESTEVENT_H__ 00023 00024 #include "CODEX_Events/Event.h" 00025 #include "CODEX_Events/Activity.h" 00026 #include "CODEX_Quorum/Message.h" 00027 #include "CODEX_Quorum/ResponseCallback.h" 00028 #include "CODEX_Quorum/QuorumSystem.h" 00029 #include "BroadcastRequestHandler.h" 00030 00031 namespace CODEX_Server 00032 { 00037 class BroadcastRequestEvent : public CODEX_Events::EventBase 00038 { 00039 public : 00041 BroadcastRequestEvent( CODEX_Events::Activity* source, 00042 BroadcastRequestHandler* destination, 00043 const CODEX_Quorum::Message& message, 00044 CODEX_Quorum::ResponseCallback* cb ); 00045 00047 virtual ~BroadcastRequestEvent(); 00048 00050 const CODEX_Quorum::Message& message() const { return m_message; } 00051 00053 CODEX_Quorum::ReturnVector& retVals() { return m_retVals; } 00054 00056 CODEX_Quorum::ResponseCallback* cb() const { return m_cb; } 00057 00059 bool bcast() const { return m_bcast; } 00060 00062 void setBcast() { m_bcast = true; } 00063 00065 unsigned long time() const { return m_time; } 00066 00068 void updateTime( unsigned long time ) { m_time = time; } 00069 00071 bool handle() { return m_destination->handler( *this ); } 00072 00073 private : 00074 BroadcastRequestHandler* m_destination; 00075 CODEX_Quorum::Message m_message; 00076 CODEX_Quorum::ResponseCallback* m_cb; 00077 CODEX_Quorum::ReturnVector m_retVals; 00078 bool m_bcast; 00079 unsigned long m_time; 00080 }; 00081 00082 } 00083 00084 #endif /* __CODEX_SERVER_BROADCASTREQUESTEVENT_H__ */
1.4.1