683684685686687688689690691
return new MessageProxy(jbm); } public Object handleCreateBytesMessage(Invocation invocation) throws Throwable { JBossBytesMessage jbm = new JBossBytesMessage(0); return new BytesMessageProxy(jbm); }
199200201202203204205206207208209
// a message whose implementation is not one of its own. // create a matching JBossMessage Type from JMS Type if(m instanceof BytesMessage) { messageToSend = new JBossBytesMessage((BytesMessage)m,0); } else if(m instanceof MapMessage) { messageToSend = new JBossMapMessage((MapMessage)m,0); }
6061626364656667686970
{ m = new JBossTextMessage(); } else if (type == JBossBytesMessage.TYPE) //4 { m = new JBossBytesMessage(); } else if (type == JBossMapMessage.TYPE) //5 { m = new JBossMapMessage(); }
119120121122123124125126127128129
timestamp, priority, headers, payload); break; } case JBossBytesMessage.TYPE: { m = new JBossBytesMessage(messageID, reliable, expiration, timestamp, priority, headers, payload); break; } case JBossMapMessage.TYPE: {
110211031104110511061107110811091110111111121113111411151116111711181119112011211122
} public void testCopyOnJBossBytesMessage() throws JMSException { JBossBytesMessage jbossBytesMessage = (JBossBytesMessage)(((MessageProxy)queueProducerSession. createBytesMessage()).getMessage()); for(int i = 0; i < 20; i++) { jbossBytesMessage.writeByte((byte)i); } jbossBytesMessage.reset(); JBossBytesMessage copy = new JBossBytesMessage(jbossBytesMessage); copy.reset(); ensureEquivalent(jbossBytesMessage, copy); }
112811291130113111321133113411351136113711381139
for(int i = 0; i < 20; i++) { foreignBytesMessage.writeByte((byte)i); } JBossBytesMessage copy = new JBossBytesMessage(foreignBytesMessage, 0); foreignBytesMessage.reset(); copy.reset(); ensureEquivalent(foreignBytesMessage, copy); }
654655656657658659660661662