Qpid Proton C++  0.13.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
messaging_handler.hpp
1 #ifndef PROTON_MESSAGING_HANDLER_HPP
2 #define PROTON_MESSAGING_HANDLER_HPP
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 "./internal/export.hpp"
26 #include "./internal/pn_unique_ptr.hpp"
27 
28 namespace proton {
29 
30 class error_condition;
31 class container;
32 class event;
33 class transport;
34 class connection;
35 class session;
36 class sender;
37 class receiver;
38 class tracker;
39 class delivery;
40 class message;
41 class messaging_adapter;
42 
43 namespace io {
44 class connection_engine;
45 }
46 
75 class
76 PN_CPP_CLASS_EXTERN messaging_handler {
77  public:
78  PN_CPP_EXTERN messaging_handler();
79  PN_CPP_EXTERN virtual ~messaging_handler();
80 
82  PN_CPP_EXTERN virtual void on_container_start(container &c);
83 
85  PN_CPP_EXTERN virtual void on_message(delivery &d, message &m);
86 
88  PN_CPP_EXTERN virtual void on_sendable(sender &s);
89 
91  PN_CPP_EXTERN virtual void on_transport_open(transport &t);
92 
94  PN_CPP_EXTERN virtual void on_transport_close(transport &t);
95 
98  PN_CPP_EXTERN virtual void on_transport_error(transport &t);
99 
101  PN_CPP_EXTERN virtual void on_connection_open(connection &c);
102 
104  PN_CPP_EXTERN virtual void on_connection_close(connection &c);
105 
107  PN_CPP_EXTERN virtual void on_connection_error(connection &c);
108 
110  PN_CPP_EXTERN virtual void on_session_open(session &s);
111 
113  PN_CPP_EXTERN virtual void on_session_close(session &s);
114 
116  PN_CPP_EXTERN virtual void on_session_error(session &s);
117 
119  PN_CPP_EXTERN virtual void on_receiver_open(receiver& l);
120 
122  PN_CPP_EXTERN virtual void on_receiver_close(receiver& l);
123 
125  PN_CPP_EXTERN virtual void on_receiver_error(receiver& l);
126 
128  PN_CPP_EXTERN virtual void on_sender_open(sender& l);
129 
131  PN_CPP_EXTERN virtual void on_sender_close(sender& l);
132 
134  PN_CPP_EXTERN virtual void on_sender_error(sender& l);
135 
137  PN_CPP_EXTERN virtual void on_tracker_accept(tracker &d);
138 
140  PN_CPP_EXTERN virtual void on_tracker_reject(tracker &d);
141 
143  PN_CPP_EXTERN virtual void on_tracker_release(tracker &d);
144 
146  PN_CPP_EXTERN virtual void on_tracker_settle(tracker &d);
147 
149  PN_CPP_EXTERN virtual void on_delivery_settle(delivery &d);
150 
153  PN_CPP_EXTERN virtual void on_sender_drain_start(sender &s);
154 
157  PN_CPP_EXTERN virtual void on_receiver_drain_finish(receiver &r);
158 
160  PN_CPP_EXTERN virtual void on_error(const error_condition &c);
161 
162  private:
163  internal::pn_unique_ptr<messaging_adapter> messaging_adapter_;
164 
166  friend class container;
167  friend class container_impl;
168  friend class io::connection_engine;
169  friend class connection_options;
170  friend class receiver_options;
171  friend class sender_options;
172  friend class session_options;
174 };
175 
176 } // proton
177 
178 #endif // PROTON_MESSAGING_HANDLER_HPP
An AMQP message.
Definition: message.hpp:51
A top-level container of connections, sessions, senders, and receivers.
Definition: container.hpp:62
A channel for sending messages.
Definition: sender.hpp:40
Options for creating a sender.
Definition: sender_options.hpp:64
A connection to a remote AMQP peer.
Definition: connection.hpp:48
Options for creating a connection.
Definition: connection_options.hpp:67
A container of senders and receivers.
Definition: session.hpp:46
A received message.
Definition: delivery.hpp:40
A tracker for a sent message.
Definition: tracker.hpp:37
Options for creating a receiver.
Definition: receiver_options.hpp:62
Experimental - An AMQP protocol engine for a single connection.
Definition: connection_engine.hpp:100
A channel for receiving messages.
Definition: receiver.hpp:39
A handler for Proton messaging events.
Definition: messaging_handler.hpp:75
A network channel supporting an AMQP connection.
Definition: transport.hpp:42
Options for creating a session.
Definition: session_options.hpp:42
Describes an endpoint error state.
Definition: error_condition.hpp:37