291292293294295296297298299300301
} else if (message instanceof BytesMessage) { BBEncoder encoder = new BBEncoder(1024); encoder.writeList(list); ByteBuffer buf = encoder.segment(); byte[] data = new byte[buf.limit()]; buf.get(data); ((BytesMessage)message).writeBytes(data); } else
104105106107108109110111112113114
@ Override protected void writeMapToData() { BBEncoder encoder = new BBEncoder(1024); encoder.writeMap(_map); _data = ByteBuffer.wrap(encoder.segment()); } // for testing Map<String,Object> getMap() {
192193194195196197198199200201202
{ enc.writeUint16(0x0100); } } method.write(enc); ByteBuffer methodSeg = enc.segment(); byte flags = FIRST_SEG; boolean payload = method.hasPayload(); if (!payload)
212213214215216217218219220221222
for (Struct st : structs) { enc.writeStruct32(st); } headerSeg = enc.segment(); } synchronized (sendlock) { fragment(flags, type, method, methodSeg);
177178179180181182183184185186187
200201202203204205206207208209210
for (Struct st : structs) { enc.writeStruct32(st); } } headerSeg = enc.segment(); } synchronized (sendlock) { fragment(flags, type, method, methodSeg);
8081828384858687888990
@ Override public ByteBuffer getData() { BBEncoder encoder = new BBEncoder(1024); encoder.writeMap(getMap()); return encoder.segment(); } @ Override protected void populateMapFromData(ByteBuffer data) throws JMSException {
918919920921922923924925926927928
public ByteBuffer getData() throws JMSException { BBEncoder encoder = new BBEncoder(1024); encoder.writeList(_list); return encoder.segment(); } public void setList(List<Object> l) { _list = l;
215216217218219220221222223224225