Skip to content

Commit 9b618e8

Browse files
author
Steve Powell
committed
Extensive changes to Tracer.java to allow embeddable use:
AsyncLogger (a Logger implementation) is now available for external use; Tracers are to be started after instantiation; Loggers are serially startable and stoppable; Properties (Heartbeat suppression, frame decoding, and cmd body suppression) now modifiable until Tracer.start().
1 parent 2d911cb commit 9b618e8

File tree

5 files changed

+424
-225
lines changed

5 files changed

+424
-225
lines changed

src/com/rabbitmq/client/impl/Frame.java

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -36,28 +36,22 @@
3636

3737
/**
3838
* Represents an AMQP wire-protocol frame, with frame type, channel number, and payload bytes.
39+
* TODO: make state private
3940
*/
4041
public class Frame {
41-
/**
42-
* Frame type code
43-
*/
44-
public int type;
42+
/** Frame type code */
43+
public final int type;
4544

4645
/** Frame channel number, 0-65535 */
47-
public int channel;
46+
public final int channel;
4847

4948
/** Frame payload bytes (for inbound frames) */
50-
public byte[] payload;
51-
52-
/** Frame payload (for outbound frames) */
53-
public ByteArrayOutputStream accumulator;
49+
public final byte[] payload;
5450

55-
/**
56-
* Constructs an uninitialized frame.
51+
/** Frame payload (for outbound frames)
52+
* TODO: make final; currently modified explicitly in tests.
5753
*/
58-
public Frame() {
59-
// No work to do
60-
}
54+
public ByteArrayOutputStream accumulator;
6155

6256
/**
6357
* Constructs a frame for output with a type and a channel number and a

0 commit comments

Comments
 (0)