00001
00002
00003 #ifndef __ARC_MCC_PLEXER__
00004 #define __ARC_MCC_PLEXER__
00005
00006 #include <list>
00007 #include <string>
00008 #include <arc/ArcRegex.h>
00009 #include <arc/ArcConfig.h>
00010 #include <arc/message/MCC.h>
00011 #include <arc/message/Message.h>
00012
00013 namespace Arc {
00014
00016
00019 class PlexerEntry {
00020 private:
00022
00024 PlexerEntry(const RegularExpression& label,
00025 MCCInterface* service);
00026 RegularExpression label;
00027 MCCInterface* mcc;
00028 friend class Plexer;
00029 };
00030
00031
00033
00036 class Plexer: public MCC {
00037 public:
00038
00040
00044 Plexer(Config *cfg, PluginArgument* arg);
00045
00047
00051 virtual ~Plexer();
00052
00054
00058 virtual void Next(MCCInterface* next, const std::string& label);
00059
00061
00067 virtual MCC_Status process(Message& request, Message& response);
00068
00069
00070
00071 static Logger logger;
00072
00073 private:
00074
00076 static std::string getPath(std::string url);
00077
00079
00082 std::list<PlexerEntry> mccs;
00083 };
00084
00085 }
00086
00087 #endif