Skip to content

Commit 010d143

Browse files
author
Petr Matousek
committed
refactoring
1 parent a7795bf commit 010d143

File tree

3 files changed

+4
-66
lines changed

3 files changed

+4
-66
lines changed

src/api/qpid-proton/reactor/handler/TxReceiverHandler.h

Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -14,51 +14,10 @@
1414
#ifndef TXRECEIVERHANDLER_H
1515
#define TXRECEIVERHANDLER_H
1616

17-
#include <proton/binary.hpp>
18-
#include <proton/delivery.hpp>
19-
#include <proton/tracker.hpp>
20-
#include <proton/listener.hpp>
21-
#include <proton/transport.hpp>
22-
#include <proton/error_condition.hpp>
23-
#include <proton/source_options.hpp>
24-
#include <proton/connection_options.hpp>
25-
#include <proton/receiver_options.hpp>
26-
#include <proton/thread_safe.hpp>
27-
#include <proton/codec/encoder.hpp>
28-
#include <proton/uuid.hpp>
2917
#include <proton/transaction.hpp>
3018

3119
#include "ReceiverHandler.h"
3220

33-
#include "reactor/formatter/ReactorDecoder.h"
34-
#include "formatter/DictFormatter.h"
35-
#include "formatter/DictWriter.h"
36-
37-
#include "formatter/UpstreamFormatter.h"
38-
#include "formatter/UpstreamWriter.h"
39-
#include "Utils.h"
40-
41-
using proton::message;
42-
using proton::container;
43-
using proton::connection;
44-
using proton::sender;
45-
using proton::receiver;
46-
using proton::listener;
47-
using proton::delivery;
48-
using proton::tracker;
49-
using proton::void_function0;
50-
using proton::endpoint;
51-
using proton::source;
52-
using proton::source_options;
53-
using proton::transport;
54-
using proton::connection_options;
55-
using proton::receiver_options;
56-
using proton::symbol;
57-
using proton::codec::start;
58-
using proton::codec::finish;
59-
using proton::codec::encoder;
60-
using proton::binary;
61-
using proton::uuid;
6221
using proton::transaction;
6322
using proton::session;
6423
using proton::transaction_handler;
@@ -72,7 +31,7 @@ namespace proton {
7231
namespace reactor {
7332

7433
/**
75-
* A proton message handler that handles message receive events
34+
* A proton transaction message handler that handles message receive events
7635
*/
7736
class TxReceiverHandler : public ReceiverHandler, transaction_handler {
7837
public:

src/api/qpid-proton/reactor/handler/TxSenderHandler.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,12 @@ int TxSenderHandler::getBatchSize() const
110110
return batch_size;
111111
}
112112

113-
// TODO parametrize and remove
114113
void TxSenderHandler::checkIfCanSend() {
115114
if (processed < count) {
116115
work_q->schedule(interval, make_work(&TxSenderHandler::checkIfCanSend, this));
117116

118117
if (sndr.credit() > 0) {
119-
send();
118+
send();
120119
} else {
121120
ready = true;
122121
}

src/api/qpid-proton/reactor/handler/TxSenderHandler.h

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,30 +14,10 @@
1414
#ifndef TXSENDERHANDLER_H
1515
#define TXSENDERHANDLER_H
1616

17-
#include <proton/tracker.hpp>
18-
#include <proton/transport.hpp>
19-
#include <proton/error_condition.hpp>
20-
#include <proton/message_id.hpp>
21-
#include <proton/source_options.hpp>
22-
#include <proton/connection_options.hpp>
23-
#include <proton/sender_options.hpp>
24-
#include <proton/thread_safe.hpp>
2517
#include <proton/transaction.hpp>
2618

2719
#include "SenderHandler.h"
28-
#include "Timer.h"
29-
#include "Utils.h"
30-
31-
using proton::message;
32-
using proton::message_id;
33-
using proton::connection;
34-
using proton::sender;
35-
using proton::delivery;
36-
using proton::source_options;
37-
using proton::transport;
38-
using proton::tracker;
39-
using proton::connection_options;
40-
using proton::sender;
20+
4121
using proton::transaction;
4222
using proton::session;
4323
using proton::transaction_handler;
@@ -49,7 +29,7 @@ namespace reactor {
4929
using dtests::common::Timer;
5030

5131
/**
52-
* A proton message handler that handles message send events
32+
* A proton transaction message handler that handles message send events
5333
*/
5434
class TxSenderHandler : public SenderHandler, transaction_handler {
5535
public:

0 commit comments

Comments
 (0)