transport_fastmsg.h Source File (original) (raw)
00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 00029 00030 00031 00032 00033 00034 00035 00036 #ifndef MPS_Transport_Fastmsg_H 00037 #define MPS_Transport_Fastmsg_H 00038 00039 #include <mps/mps.h> 00040 #include <fastmsg/Scheduler.h> 00041 00042 namespace MPS { 00043 00044 00045 00046 00047 00048 00049 00050 00051 00052 00053 00054 class FastmsgTransport: public MPS::Transport { 00055 private: 00056 static FastmsgTransport *instance; 00057 00058 Scheduler &sched; 00059 00060 FastmsgTransport(Scheduler &s); 00061 00062 protected: 00063 virtual ref connectTo(Address const &connectionSpec); 00064 virtual string registerServer(Server *server, Address const &spec); 00065 virtual string deregisterServer(Server *server, Address const &spec); 00066 00067 public: 00068 static void initialise(Scheduler &s) { 00069 if (instance == 0) { 00070 instance = new FastmsgTransport(s); 00071 } 00072 } 00073 }; 00074 00075 } 00076 00077 #endif