Apache Qpid C++ API
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

gen/qpid/framing/AMQP_ClientProxy.h

Go to the documentation of this file.
00001 #ifndef QPID_FRAMING_AMQP_CLIENTPROXY_H
00002 #define QPID_FRAMING_AMQP_CLIENTPROXY_H
00003 /*
00004  *
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  *
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00028 
00029 
00030 #include "qpid/framing/Proxy.h"
00031 #include "qpid/framing/Array.h"
00032 #include "qpid/framing/amqp_types.h"
00033 #include "qpid/framing/amqp_structs.h"
00034 
00035 namespace qpid {
00036 namespace framing {
00037 
00038 class AMQP_ClientProxy:
00039     public Proxy
00040 {
00041   public:
00042     AMQP_ClientProxy(FrameHandler& out);
00043     
00044     class Connection:
00045         public Proxy
00046     {
00047         public:
00048         Connection(FrameHandler& f) : Proxy(f) {}
00049         static Connection& get(AMQP_ClientProxy& proxy) { return proxy.getConnection(); }
00050         virtual void start(const FieldTable& serverProperties,
00051                     const Array& mechanisms,
00052                     const Array& locales);
00053         
00054         virtual void secure(const string& challenge);
00055         
00056         virtual void tune(uint16_t channelMax,
00057                     uint16_t maxFrameSize,
00058                     uint16_t heartbeatMin,
00059                     uint16_t heartbeatMax);
00060         
00061         virtual void openOk(const Array& knownHosts);
00062         
00063         virtual void redirect(const string& host,
00064                     const Array& knownHosts);
00065         
00066         virtual void heartbeat();
00067         
00068         virtual void close(uint16_t replyCode,
00069                     const string& replyText);
00070         
00071         virtual void closeOk();
00072         
00073     };
00074     
00075     Connection& getConnection() { return connectionProxy; }
00076     
00077     class Session:
00078         public Proxy
00079     {
00080         public:
00081         Session(FrameHandler& f) : Proxy(f) {}
00082         static Session& get(AMQP_ClientProxy& proxy) { return proxy.getSession(); }
00083         virtual void attach(const string& name,
00084                     bool force);
00085         
00086         virtual void attached(const string& name);
00087         
00088         virtual void detach(const string& name);
00089         
00090         virtual void detached(const string& name,
00091                     uint8_t code);
00092         
00093         virtual void requestTimeout(uint32_t timeout);
00094         
00095         virtual void timeout(uint32_t timeout);
00096         
00097         virtual void commandPoint(const SequenceNumber& commandId,
00098                     uint64_t commandOffset);
00099         
00100         virtual void expected(const SequenceSet& commands,
00101                     const Array& fragments);
00102         
00103         virtual void confirmed(const SequenceSet& commands,
00104                     const Array& fragments);
00105         
00106         virtual void completed(const SequenceSet& commands,
00107                     bool timelyReply);
00108         
00109         virtual void knownCompleted(const SequenceSet& commands);
00110         
00111         virtual void flush(bool expected,
00112                     bool confirmed,
00113                     bool completed);
00114         
00115         virtual void gap(const SequenceSet& commands);
00116         
00117     };
00118     
00119     Session& getSession() { return sessionProxy; }
00120     
00121     class Execution:
00122         public Proxy
00123     {
00124         public:
00125         Execution(FrameHandler& f) : Proxy(f) {}
00126         static Execution& get(AMQP_ClientProxy& proxy) { return proxy.getExecution(); }
00127         virtual void sync();
00128         
00129         virtual void result(const SequenceNumber& commandId,
00130                     const string& value);
00131         
00132         virtual void exception(uint16_t errorCode,
00133                     const SequenceNumber& commandId,
00134                     uint8_t classCode,
00135                     uint8_t commandCode,
00136                     uint8_t fieldIndex,
00137                     const string& description,
00138                     const FieldTable& errorInfo);
00139         
00140     };
00141     
00142     Execution& getExecution() { return executionProxy; }
00143     
00144     class Message:
00145         public Proxy
00146     {
00147         public:
00148         Message(FrameHandler& f) : Proxy(f) {}
00149         static Message& get(AMQP_ClientProxy& proxy) { return proxy.getMessage(); }
00150         virtual void transfer(const string& destination,
00151                     uint8_t acceptMode,
00152                     uint8_t acquireMode);
00153         
00154         virtual void accept(const SequenceSet& transfers);
00155         
00156         virtual void reject(const SequenceSet& transfers,
00157                     uint16_t code,
00158                     const string& text);
00159         
00160         virtual void release(const SequenceSet& transfers,
00161                     bool setRedelivered);
00162         
00163         virtual void resume(const string& destination,
00164                     const string& resumeId);
00165         
00166         virtual void setFlowMode(const string& destination,
00167                     uint8_t flowMode);
00168         
00169         virtual void flow(const string& destination,
00170                     uint8_t unit,
00171                     uint32_t value);
00172         
00173         virtual void stop(const string& destination);
00174         
00175     };
00176     
00177     Message& getMessage() { return messageProxy; }
00178     
00179     class Tx:
00180         public Proxy
00181     {
00182         public:
00183         Tx(FrameHandler& f) : Proxy(f) {}
00184         static Tx& get(AMQP_ClientProxy& proxy) { return proxy.getTx(); }
00185     };
00186     
00187     Tx& getTx() { return txProxy; }
00188     
00189     class Dtx:
00190         public Proxy
00191     {
00192         public:
00193         Dtx(FrameHandler& f) : Proxy(f) {}
00194         static Dtx& get(AMQP_ClientProxy& proxy) { return proxy.getDtx(); }
00195     };
00196     
00197     Dtx& getDtx() { return dtxProxy; }
00198     
00199     class Exchange:
00200         public Proxy
00201     {
00202         public:
00203         Exchange(FrameHandler& f) : Proxy(f) {}
00204         static Exchange& get(AMQP_ClientProxy& proxy) { return proxy.getExchange(); }
00205     };
00206     
00207     Exchange& getExchange() { return exchangeProxy; }
00208     
00209     class Queue:
00210         public Proxy
00211     {
00212         public:
00213         Queue(FrameHandler& f) : Proxy(f) {}
00214         static Queue& get(AMQP_ClientProxy& proxy) { return proxy.getQueue(); }
00215     };
00216     
00217     Queue& getQueue() { return queueProxy; }
00218     
00219     class File:
00220         public Proxy
00221     {
00222         public:
00223         File(FrameHandler& f) : Proxy(f) {}
00224         static File& get(AMQP_ClientProxy& proxy) { return proxy.getFile(); }
00225         virtual void qosOk();
00226         
00227         virtual void consumeOk(const string& consumerTag);
00228         
00229         virtual void open(const string& identifier,
00230                     uint64_t contentSize);
00231         
00232         virtual void openOk(uint64_t stagedSize);
00233         
00234         virtual void stage();
00235         
00236         virtual void return_(uint16_t replyCode,
00237                     const string& replyText,
00238                     const string& exchange,
00239                     const string& routingKey);
00240         
00241         virtual void deliver(const string& consumerTag,
00242                     uint64_t deliveryTag,
00243                     bool redelivered,
00244                     const string& exchange,
00245                     const string& routingKey,
00246                     const string& identifier);
00247         
00248     };
00249     
00250     File& getFile() { return fileProxy; }
00251     
00252     class Stream:
00253         public Proxy
00254     {
00255         public:
00256         Stream(FrameHandler& f) : Proxy(f) {}
00257         static Stream& get(AMQP_ClientProxy& proxy) { return proxy.getStream(); }
00258         virtual void qosOk();
00259         
00260         virtual void consumeOk(const string& consumerTag);
00261         
00262         virtual void return_(uint16_t replyCode,
00263                     const string& replyText,
00264                     const string& exchange,
00265                     const string& routingKey);
00266         
00267         virtual void deliver(const string& consumerTag,
00268                     uint64_t deliveryTag,
00269                     const string& exchange,
00270                     const string& queue);
00271         
00272     };
00273     
00274     Stream& getStream() { return streamProxy; }
00275     
00276     class Cluster:
00277         public Proxy
00278     {
00279         public:
00280         Cluster(FrameHandler& f) : Proxy(f) {}
00281         static Cluster& get(AMQP_ClientProxy& proxy) { return proxy.getCluster(); }
00282     };
00283     
00284     Cluster& getCluster() { return clusterProxy; }
00285     
00286     class ClusterConnection:
00287         public Proxy
00288     {
00289         public:
00290         ClusterConnection(FrameHandler& f) : Proxy(f) {}
00291         static ClusterConnection& get(AMQP_ClientProxy& proxy) { return proxy.getClusterConnection(); }
00292     };
00293     
00294     ClusterConnection& getClusterConnection() { return clusterConnectionProxy; }
00295     
00296   private:
00297     Connection connectionProxy;
00298     Session sessionProxy;
00299     Execution executionProxy;
00300     Message messageProxy;
00301     Tx txProxy;
00302     Dtx dtxProxy;
00303     Exchange exchangeProxy;
00304     Queue queueProxy;
00305     File fileProxy;
00306     Stream streamProxy;
00307     Cluster clusterProxy;
00308     ClusterConnection clusterConnectionProxy;
00309 };
00310 
00311 }} // namespace qpid::framing
00312 
00313 #endif  

Qpid C++ API Reference
Generated on Tue Dec 8 15:39:35 2009 for Qpid C++ Client API by doxygen 1.4.7