use of org.jgroups.protocols.TpHeader in project JGroups by belaban.
the class MessageTest method addHeaders.
protected static void addHeaders(Message msg) {
TpHeader tp_hdr = new TpHeader("DemoChannel2");
msg.putHeader(UDP_ID, tp_hdr);
PingHeader ping_hdr = new PingHeader(PingHeader.GET_MBRS_REQ).clusterName("demo-cluster");
msg.putHeader(PING_ID, ping_hdr);
NakAckHeader2 nak_hdr = NakAckHeader2.createXmitRequestHeader(Util.createRandomAddress("S"));
msg.putHeader(NAKACK_ID, nak_hdr);
}
use of org.jgroups.protocols.TpHeader in project JGroups by belaban.
the class MessageSizeTest method createMessage.
static Message createMessage(Address dest, Address src) {
Message msg = new Message(dest, "hello world").src(src);
msg.putHeader(NAKACK_ID, NakAckHeader2.createMessageHeader(322649));
msg.putHeader(UNICAST_ID, UnicastHeader3.createDataHeader(465784, (short) 23323, true));
msg.putHeader(UDP_ID, new TpHeader("DrawDemo"));
return msg;
}
use of org.jgroups.protocols.TpHeader in project JGroups by belaban.
the class StreamableTest method testHeaders.
public static void testHeaders() throws Exception {
Address dest = UUID.randomUUID();
Address src = UUID.randomUUID();
Message msg = new Message(dest, "Hello world".getBytes()).src(src);
PingHeader hdr = new PingHeader(PingHeader.GET_MBRS_REQ);
msg.putHeader(PING_ID, hdr);
TpHeader udp_hdr = new TpHeader("bla");
msg.putHeader(UDP_ID, udp_hdr);
stream(msg);
}
Aggregations