00001 #ifndef QPID_CLUSTER_PROXYINPUTHANDLER_H
00002 #define QPID_CLUSTER_PROXYINPUTHANDLER_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 "qpid/sys/ConnectionInputHandler.h"
00026 #include <boost/intrusive_ptr.hpp>
00027
00028 namespace qpid {
00029
00030 namespace framing { class AMQFrame; }
00031
00032 namespace cluster {
00033
00038 class ProxyInputHandler : public sys::ConnectionInputHandler
00039 {
00040 public:
00041 ProxyInputHandler(boost::intrusive_ptr<cluster::Connection> t) : target(t) {}
00042 ~ProxyInputHandler() { closed(); }
00043
00044 void received(framing::AMQFrame& f) { target->received(f); }
00045 void closed() { if (target) target->closed(); target = 0; }
00046 void idleOut() { target->idleOut(); }
00047 void idleIn() { target->idleIn(); }
00048 bool doOutput() { return target->doOutput(); }
00049 bool hasOutput() { return target->hasOutput(); }
00050
00051 private:
00052 boost::intrusive_ptr<cluster::Connection> target;
00053 };
00054
00055 }}
00056
00057 #endif