MCPcopy Create free account
hub / github.com/apache/tomcat / ChannelData

Class ChannelData

java/org/apache/catalina/tribes/io/ChannelData.java:34–393  ·  view source on GitHub ↗

The ChannelData object is used to transfer a message through the channel interceptor stack and eventually out on a transport to be sent to another node. While the message is being processed by the different interceptors, the message data can be manipulated as each interceptor seems appr

Source from the content-addressed store, hash-verified

32 * interceptors, the message data can be manipulated as each interceptor seems appropriate.
33 */
34public class ChannelData implements ChannelMessage {
35 @Serial
36 private static final long serialVersionUID = 1L;
37
38 /**
39 * Empty array to avoid reinstantiating arrays.
40 */
41 public static final ChannelData[] EMPTY_DATA_ARRAY = new ChannelData[0];
42
43 /**
44 * Flag to control whether secure random is used for UUID generation.
45 */
46 public static volatile boolean USE_SECURE_RANDOM_FOR_UUID = false;
47
48 /**
49 * The options this message was sent with
50 */
51 private int options = 0;
52 /**
53 * The message data, stored in a dynamic buffer
54 */
55 private XByteBuffer message;
56 /**
57 * The timestamp that goes with this message
58 */
59 private long timestamp;
60 /**
61 * A unique message id
62 */
63 private byte[] uniqueId;
64 /**
65 * The source or reply-to address for this message
66 */
67 private Member address;
68
69 /**
70 * Creates an empty channel data with a new unique Id
71 *
72 * @see #ChannelData(boolean)
73 */
74 public ChannelData() {
75 this(true);
76 }
77
78 /**
79 * Create an empty channel data object
80 *
81 * @param generateUUID boolean - if true, a unique Id will be generated
82 */
83 public ChannelData(boolean generateUUID) {
84 if (generateUUID) {
85 generateUUID();
86 }
87 }
88
89
90 /**
91 * Creates a new channel data object with data

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected