Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Subscription.h
Go to the documentation of this file.
1 #ifndef QPID_CLIENT_SUBSCRIPTION_H
2 #define QPID_CLIENT_SUBSCRIPTION_H
3 
4 /*
5  *
6  * Licensed to the Apache Software Foundation (ASF) under one
7  * or more contributor license agreements. See the NOTICE file
8  * distributed with this work for additional information
9  * regarding copyright ownership. The ASF licenses this file
10  * to you under the Apache License, Version 2.0 (the
11  * "License"); you may not use this file except in compliance
12  * with the License. You may obtain a copy of the License at
13  *
14  * http://www.apache.org/licenses/LICENSE-2.0
15  *
16  * Unless required by applicable law or agreed to in writing,
17  * software distributed under the License is distributed on an
18  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
19  * KIND, either express or implied. See the License for the
20  * specific language governing permissions and limitations
21  * under the License.
22  *
23  */
24 
25 #include "qpid/client/Handle.h"
26 #include "qpid/client/Session.h"
28 #include "qpid/client/Message.h"
30 
31 namespace qpid {
32 namespace client {
33 
34 template <class> class PrivateImplRef;
35 class SubscriptionImpl;
36 class SubscriptionManager;
37 
42 class QPID_CLIENT_CLASS_EXTERN Subscription : public Handle<SubscriptionImpl> {
43  public:
44  QPID_CLIENT_EXTERN Subscription(SubscriptionImpl* = 0);
45  QPID_CLIENT_EXTERN Subscription(const Subscription&);
46  QPID_CLIENT_EXTERN ~Subscription();
47  QPID_CLIENT_EXTERN Subscription& operator=(const Subscription&);
48 
49 
53  QPID_CLIENT_EXTERN std::string getName() const;
54 
56  QPID_CLIENT_EXTERN std::string getQueue() const;
57 
59  QPID_CLIENT_EXTERN const SubscriptionSettings& getSettings() const;
60 
62  QPID_CLIENT_EXTERN void setFlowControl(const FlowControl&);
63 
68  QPID_CLIENT_EXTERN void setAutoAck(unsigned int n);
69 
73  QPID_CLIENT_EXTERN SequenceSet getUnacquired() const;
74 
76  QPID_CLIENT_EXTERN SequenceSet getUnaccepted() const;
77 
81  QPID_CLIENT_EXTERN void acquire(const SequenceSet& messageIds);
82 
86  QPID_CLIENT_EXTERN void accept(const SequenceSet& messageIds);
87 
91  QPID_CLIENT_EXTERN void release(const SequenceSet& messageIds);
92 
93  /* Acquire a single message */
95 
96  /* Accept a single message */
98 
99  /* Release a single message */
101 
103  QPID_CLIENT_EXTERN Session getSession() const;
104 
106  QPID_CLIENT_EXTERN SubscriptionManager getSubscriptionManager();
107 
109  QPID_CLIENT_EXTERN void cancel();
110 
112  QPID_CLIENT_EXTERN void grantMessageCredit(uint32_t);
113 
115  QPID_CLIENT_EXTERN void grantByteCredit(uint32_t);
116 
117  private:
118  friend class PrivateImplRef<Subscription>;
119  friend class SubscriptionManager;
120 };
121 }} // namespace qpid::client
122 
123 #endif

Qpid C++ API Reference
Generated on Tue Sep 25 2012 for Qpid C++ Client API by doxygen 1.8.1.1