00001 #ifndef _broker_BrokerExchange_h
00002 #define _broker_BrokerExchange_h
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #include <boost/shared_ptr.hpp>
00026 #include "Deliverable.h"
00027 #include "BrokerQueue.h"
00028 #include "qpid/framing/FieldTable.h"
00029
00030 namespace qpid {
00031 namespace broker {
00032 using std::string;
00033
00034 class Exchange{
00035 const string name;
00036 public:
00037 typedef boost::shared_ptr<Exchange> shared_ptr;
00038
00039 explicit Exchange(const string& _name) : name(_name){}
00040 virtual ~Exchange(){}
00041 string getName() { return name; }
00042 virtual string getType() = 0;
00043 virtual void bind(Queue::shared_ptr queue, const string& routingKey, const qpid::framing::FieldTable* args) = 0;
00044 virtual void unbind(Queue::shared_ptr queue, const string& routingKey, const qpid::framing::FieldTable* args) = 0;
00045 virtual void route(Deliverable& msg, const string& routingKey, const qpid::framing::FieldTable* args) = 0;
00046 };
00047 }
00048 }
00049
00050
00051 #endif