Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
AgentSession.h
Go to the documentation of this file.
1 #ifndef QMF_AGENT_SESSION_H
2 #define QMF_AGENT_SESSION_H
3 /*
4  *
5  * Licensed to the Apache Software Foundation (ASF) under one
6  * or more contributor license agreements. See the NOTICE file
7  * distributed with this work for additional information
8  * regarding copyright ownership. The ASF licenses this file
9  * to you under the Apache License, Version 2.0 (the
10  * "License"); you may not use this file except in compliance
11  * with the License. You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing,
16  * software distributed under the License is distributed on an
17  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18  * KIND, either express or implied. See the License for the
19  * specific language governing permissions and limitations
20  * under the License.
21  *
22  */
23 
24 #if !defined(QMF_USE_DEPRECATED_API) && !defined(qmf2_EXPORTS) && !defined(SWIG)
25 # error "The API defined in this file has been DEPRECATED and will be removed in the future."
26 # error "Define 'QMF_USE_DEPRECATED_API' to enable continued use of the API."
27 #endif
28 
29 #include <qmf/ImportExport.h>
30 #include "qmf/Handle.h"
33 #include "qpid/types/Variant.h"
34 #include <string>
35 
36 namespace qmf {
37 
38 #ifndef SWIG
39  template <class> class PrivateImplRef;
40 #endif
41 
42  class AgentSessionImpl;
43  class AgentEvent;
44  class Schema;
45  class Data;
46  class DataAddr;
47 
48  class QMF_CLASS_EXTERN AgentSession : public qmf::Handle<AgentSessionImpl> {
49  public:
50  QMF_EXTERN AgentSession(AgentSessionImpl* impl = 0);
51  QMF_EXTERN AgentSession(const AgentSession&);
52  QMF_EXTERN AgentSession& operator=(const AgentSession&);
53  QMF_EXTERN ~AgentSession();
54 
85  QMF_EXTERN AgentSession(qpid::messaging::Connection& conn, const std::string& options="");
86 
92  QMF_EXTERN void setDomain(const std::string& domain);
93 
101  QMF_EXTERN void setVendor(const std::string& vendor);
102  QMF_EXTERN void setProduct(const std::string& product);
103  QMF_EXTERN void setInstance(const std::string& instance);
104 
110  QMF_EXTERN void setAttribute(const std::string& key, const qpid::types::Variant& value);
111 
115  QMF_EXTERN const std::string& getName() const;
116 
121  QMF_EXTERN void open();
122 
126  QMF_EXTERN void close();
127 
135 
139  QMF_EXTERN int pendingEvents() const;
140 
144  QMF_EXTERN void registerSchema(Schema& schema);
145 
157  QMF_EXTERN DataAddr addData(Data& data, const std::string& name="", bool persistent=false);
158 
162  QMF_EXTERN void delData(const DataAddr& dataAddr);
163 
174  QMF_EXTERN void authAccept(AgentEvent& event);
175  QMF_EXTERN void authReject(AgentEvent& event, const std::string& diag="");
176  QMF_EXTERN void raiseException(AgentEvent& event, const std::string& errorText);
177  QMF_EXTERN void raiseException(AgentEvent& event, const Data& errorData);
178  QMF_EXTERN void response(AgentEvent& event, const Data& responseData);
179  QMF_EXTERN void complete(AgentEvent& event);
180  QMF_EXTERN void methodSuccess(AgentEvent& event);
181 
190  QMF_EXTERN void raiseEvent(const Data& data);
191  QMF_EXTERN void raiseEvent(const Data& data, int severity);
192 
193 #ifndef SWIG
194  private:
195  friend class qmf::PrivateImplRef<AgentSession>;
196  friend struct AgentSessionImplAccess;
197 #endif
198  };
199 
200 }
201 
202 #endif
A duration is a time in milliseconds.
Definition: Duration.h:35
static const Duration FOREVER
Definition: Duration.h:40
Represents a value of variable type.
Definition: Variant.h:73
#define QMF_EXTERN
Definition: ImportExport.h:30
A connection represents a network connection to a remote endpoint.
Definition: Connection.h:45
Definition: Data.h:47
A handle is like a pointer: refers to an underlying implementation object.
Definition: Handle.h:43
#define QMF_CLASS_EXTERN
Definition: ImportExport.h:31

Qpid C++ API Reference
Generated on Tue Oct 28 2014 for Qpid C++ Client API by doxygen 1.8.5