Qpid Proton C++  0.14.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 
27 namespace proton {
28 
29 class error_condition;
30 class container;
31 class event;
32 class transport;
33 class connection;
34 class session;
35 class sender;
36 class receiver;
37 class tracker;
38 class delivery;
39 class message;
40 class messaging_adapter;
41 
42 namespace io {
43 class connection_engine;
44 }
45 
74 class
75 PN_CPP_CLASS_EXTERN messaging_handler {
76  public:
77  PN_CPP_EXTERN messaging_handler();
78  PN_CPP_EXTERN virtual ~messaging_handler();
79 
82  PN_CPP_EXTERN virtual void on_container_start(container &c);
83 
86  PN_CPP_EXTERN virtual void on_container_stop(container &c);
87 
89  PN_CPP_EXTERN virtual void on_message(delivery &d, message &m);
90 
92  PN_CPP_EXTERN virtual void on_sendable(sender &s);
93 
95  PN_CPP_EXTERN virtual void on_transport_open(transport &t);
96 
98  PN_CPP_EXTERN virtual void on_transport_close(transport &t);
99 
102  PN_CPP_EXTERN virtual void on_transport_error(transport &t);
103 
105  PN_CPP_EXTERN virtual void on_connection_open(connection &c);
106 
108  PN_CPP_EXTERN virtual void on_connection_close(connection &c);
109 
111  PN_CPP_EXTERN virtual void on_connection_error(connection &c);
112 
114  PN_CPP_EXTERN virtual void on_session_open(session &s);
115 
117  PN_CPP_EXTERN virtual void on_session_close(session &s);
118 
120  PN_CPP_EXTERN virtual void on_session_error(session &s);
121 
123  PN_CPP_EXTERN virtual void on_receiver_open(receiver& l);
124 
126  PN_CPP_EXTERN virtual void on_receiver_detach(receiver& l);
127 
129  PN_CPP_EXTERN virtual void on_receiver_close(receiver& l);
130 
132  PN_CPP_EXTERN virtual void on_receiver_error(receiver& l);
133 
135  PN_CPP_EXTERN virtual void on_sender_open(sender& l);
136 
138  PN_CPP_EXTERN virtual void on_sender_detach(sender& l);
139 
141  PN_CPP_EXTERN virtual void on_sender_close(sender& l);
142 
144  PN_CPP_EXTERN virtual void on_sender_error(sender& l);
145 
147  PN_CPP_EXTERN virtual void on_tracker_accept(tracker &d);
148 
150  PN_CPP_EXTERN virtual void on_tracker_reject(tracker &d);
151 
153  PN_CPP_EXTERN virtual void on_tracker_release(tracker &d);
154 
156  PN_CPP_EXTERN virtual void on_tracker_settle(tracker &d);
157 
159  PN_CPP_EXTERN virtual void on_delivery_settle(delivery &d);
160 
163  PN_CPP_EXTERN virtual void on_sender_drain_start(sender &s);
164 
167  PN_CPP_EXTERN virtual void on_receiver_drain_finish(receiver &r);
168 
170  PN_CPP_EXTERN virtual void on_error(const error_condition &c);
171 };
172 
173 } // proton
174 
175 #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
A connection to a remote AMQP peer.
Definition: connection.hpp:48
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
A channel for receiving messages.
Definition: receiver.hpp:39
A handler for Proton messaging events.
Definition: messaging_handler.hpp:74
A network channel supporting an AMQP connection.
Definition: transport.hpp:42
Type traits for mapping between AMQP and C++ types.
Definition: annotation_key.hpp:28
Describes an endpoint error state.
Definition: error_condition.hpp:37