Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/AgentSession.h
Go to the documentation of this file.
00001 #ifndef QMF_AGENT_SESSION_H
00002 #define QMF_AGENT_SESSION_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 
00024 #include <qmf/ImportExport.h>
00025 #include "qmf/Handle.h"
00026 #include "qpid/messaging/Duration.h"
00027 #include "qpid/messaging/Connection.h"
00028 #include "qpid/types/Variant.h"
00029 #include <string>
00030 
00031 namespace qmf {
00032 
00033 #ifndef SWIG
00034     template <class> class PrivateImplRef;
00035 #endif
00036 
00037     class AgentSessionImpl;
00038     class AgentEvent;
00039     class Schema;
00040     class Data;
00041     class DataAddr;
00042 
00043     class QMF_CLASS_EXTERN AgentSession : public qmf::Handle<AgentSessionImpl> {
00044     public:
00045         QMF_EXTERN AgentSession(AgentSessionImpl* impl = 0);
00046         QMF_EXTERN AgentSession(const AgentSession&);
00047         QMF_EXTERN AgentSession& operator=(const AgentSession&);
00048         QMF_EXTERN ~AgentSession();
00049 
00075         QMF_EXTERN AgentSession(qpid::messaging::Connection& conn, const std::string& options="");
00076 
00082         QMF_EXTERN void setDomain(const std::string& domain);
00083 
00091         QMF_EXTERN void setVendor(const std::string& vendor);
00092         QMF_EXTERN void setProduct(const std::string& product);
00093         QMF_EXTERN void setInstance(const std::string& instance);
00094 
00100         QMF_EXTERN void setAttribute(const std::string& key, const qpid::types::Variant& value);
00101 
00105         QMF_EXTERN const std::string& getName() const;
00106 
00111         QMF_EXTERN void open();
00112 
00116         QMF_EXTERN void close();
00117 
00124         QMF_EXTERN bool nextEvent(AgentEvent& outEvent, qpid::messaging::Duration timeout=qpid::messaging::Duration::FOREVER);
00125 
00129         QMF_EXTERN int pendingEvents() const;
00130 
00134         QMF_EXTERN void registerSchema(Schema& schema);
00135 
00147         QMF_EXTERN DataAddr addData(Data& data, const std::string& name="", bool persistent=false);
00148 
00152         QMF_EXTERN void delData(const DataAddr& dataAddr);
00153 
00164         QMF_EXTERN void authAccept(AgentEvent& event);
00165         QMF_EXTERN void authReject(AgentEvent& event, const std::string& diag="");
00166         QMF_EXTERN void raiseException(AgentEvent& event, const std::string& errorText);
00167         QMF_EXTERN void raiseException(AgentEvent& event, const Data& errorData);
00168         QMF_EXTERN void response(AgentEvent& event, const Data& responseData);
00169         QMF_EXTERN void complete(AgentEvent& event);
00170         QMF_EXTERN void methodSuccess(AgentEvent& event);
00171 
00180         QMF_EXTERN void raiseEvent(const Data& data);
00181         QMF_EXTERN void raiseEvent(const Data& data, int severity);
00182 
00183 #ifndef SWIG
00184     private:
00185         friend class qmf::PrivateImplRef<AgentSession>;
00186 #endif
00187     };
00188 
00189 }
00190 
00191 #endif

Qpid C++ API Reference
Generated on Mon Aug 22 2011 for Qpid C++ Client API by doxygen 1.7.4