Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   Related Pages  

MessageDeliverer.h

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: MessageDeliverer.h,v 1.3 2004/05/19 15:56:24 mmarsh Exp $
00008 //
00009 // $Log: MessageDeliverer.h,v $
00010 // Revision 1.3  2004/05/19 15:56:24  mmarsh
00011 // Added copyright and license statements.
00012 //
00013 // Revision 1.2  2003/11/04 22:31:45  mmarsh
00014 // *** empty log message ***
00015 //
00016 //
00017 
00018 #ifndef __CODEX_APSS_MESSAGEDELIVERER_H__
00019 #define __CODEX_APSS_MESSAGEDELIVERER_H__
00020 
00021 #include "CODEX_Events/Activity.h"
00022 #include "CODEX_Quorum/Message.h"
00023 #include "CODEX_Quorum/ResponseCallback.h"
00024 #include "CODEX_Server/ServerResponseHandler.h"
00025 #include "CODEX_Server/BroadcastRequestHandler.h"
00026 
00027 namespace CODEX_APSS
00028 {
00035    class MessageDeliverer : public CODEX_Events::Activity
00036    {
00037       public :
00039          MessageDeliverer(
00040             CODEX_Events::DeadPileType& deadPile,
00041             CODEX_Events::QType& eventQueue,
00042             CODEX_Server::ServerResponseHandler* responder,
00043             CODEX_Server::BroadcastRequestHandler* broadcaster );
00044 
00046          virtual ~MessageDeliverer();
00047 
00054          void sendTo( unsigned int server,
00055                       const CODEX_Quorum::Message& message );
00056 
00065          void broadcast( const CODEX_Quorum::Message& message,
00066                          CODEX_Quorum::ResponseCallback* cb );
00067 
00068       private :
00069          CODEX_Server::ServerResponseHandler*    m_responder;
00070          CODEX_Server::BroadcastRequestHandler*  m_broadcaster;
00071    };
00072 
00073 }
00074 
00075 #endif /* __CODEX_APSS_MESSAGEDELIVERER_H__ */

Generated on Wed Jun 2 16:32:55 2004 for COrnell Data EXchange (CODEX) by doxygen1.2.18