/usr/share/cruisecontrol-bin-2.6.1/projects/qpid-trunk/cpp/src/qpid/broker/MessageHandlerImpl.h

00001 #ifndef _broker_MessageHandlerImpl_h
00002 #define _broker_MessageHandlerImpl_h
00003 
00004 /*
00005  *
00006  * Copyright (c) 2006 The Apache Software Foundation
00007  *
00008  * Licensed under the Apache License, Version 2.0 (the "License");
00009  * you may not use this file except in compliance with the License.
00010  * You may obtain a copy of the License at
00011  *
00012  *    http://www.apache.org/licenses/LICENSE-2.0
00013  *
00014  * Unless required by applicable law or agreed to in writing, software
00015  * distributed under the License is distributed on an "AS IS" BASIS,
00016  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00017  * See the License for the specific language governing permissions and
00018  * limitations under the License.
00019  *
00020  */
00021 
00022 #include <memory>
00023 
00024 #include "qpid/framing/AMQP_ServerOperations.h"
00025 #include "qpid/framing/AMQP_ClientProxy.h"
00026 #include "HandlerImpl.h"
00027 
00028 #include <boost/function.hpp>
00029 
00030 namespace qpid {
00031 namespace broker {
00032 
00033 class Connection;
00034 class Broker;
00035 class MessageMessage;
00036 
00037 class MessageHandlerImpl :
00038         public framing::AMQP_ServerOperations::MessageHandler,
00039         public HandlerImpl
00040 {
00041     typedef boost::function<void(DeliveryId, DeliveryId)> RangedOperation;    
00042     RangedOperation releaseOp;
00043     RangedOperation rejectOp;
00044 
00045   public:
00046     MessageHandlerImpl(SemanticState&);
00047 
00048     void append(const std::string& reference, const std::string& bytes);
00049 
00050     void cancel(const std::string& destination );
00051 
00052     void checkpoint(const std::string& reference,
00053                      const std::string& identifier );
00054 
00055     void close(const std::string& reference );
00056 
00057     void empty();
00058 
00059     void get(uint16_t ticket,
00060               const std::string& queue,
00061               const std::string& destination,
00062               bool noAck );
00063 
00064     void offset(uint64_t value);
00065 
00066     void ok();
00067 
00068     void open(const std::string& reference );
00069 
00070     void qos(uint32_t prefetchSize,
00071               uint16_t prefetchCount,
00072               bool global );
00073 
00074     void recover(bool requeue );
00075 
00076     void reject(const framing::SequenceNumberSet& transfers,
00077                 uint16_t code,
00078                 const std::string& text );
00079 
00080     void resume(const std::string& reference,
00081                  const std::string& identifier );
00082 
00083     void flow(const std::string& destination, u_int8_t unit, u_int32_t value);
00084     
00085     void flowMode(const std::string& destination, u_int8_t mode);
00086     
00087     void flush(const std::string& destination);
00088 
00089     void stop(const std::string& destination);
00090 
00091     void acquire(const framing::SequenceNumberSet& transfers, u_int8_t mode);
00092 
00093     void release(const framing::SequenceNumberSet& transfers);
00094 
00095     void subscribe(u_int16_t ticket,
00096                    const std::string& queue,
00097                    const std::string& destination,
00098                    bool noLocal,
00099                    u_int8_t confirmMode,
00100                    u_int8_t acquireMode,
00101                    bool exclusive,
00102                    const framing::FieldTable& filter);
00103 
00104 };
00105 
00106 }} // namespace qpid::broker
00107 
00108 
00109 
00110 #endif  

Generated on Thu Apr 10 11:08:17 2008 for Qpid by  doxygen 1.4.7