@Override public int readInt() throws JMSException { return message.readInt(); }
public int readInt() throws JMSException { return ((BytesMessage) message).readInt(); }
public int readInt() throws JMSException { return ((BytesMessage) message).readInt(); }
/** * Read * @return The value * @exception JMSException Thrown if an error occurs */ public int readInt() throws JMSException { if (_log.isTraceEnabled()) { _log.trace("readInt()"); } return ((BytesMessage)_message).readInt(); }
/** * Read * * @return The value * @throws JMSException Thrown if an error occurs */ @Override public int readInt() throws JMSException { if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("readInt()"); } return ((BytesMessage) message).readInt(); }
/** * Read * * @return The value * @throws JMSException Thrown if an error occurs */ @Override public int readInt() throws JMSException { if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("readInt()"); } return ((BytesMessage) message).readInt(); }
Integer id; try { id = message.readInt(); final LookupEntity recordProperty = this.lookupEntityMap.get(id); if (recordProperty != null) { values[i] = Short.valueOf(message.readShort()); } else if (int.class.equals(parameterType)) { values[i] = message.readInt(); } else if (Integer.class.equals(parameterType)) { values[i] = Integer.valueOf(message.readInt()); } else if (long.class.equals(parameterType)) { values[i] = message.readLong(); values[i] = Double.valueOf(message.readDouble()); } else if (String.class.equals(parameterType)) { final int bufLen = message.readInt(); final int resultLen = message.readBytes(this.buffer, bufLen); if (resultLen == bufLen) {
final Integer id; try { id = message.readInt(); final LookupEntity recordProperty = this.lookupEntityMap.get(id); if (recordProperty != null) { values[i] = Short.valueOf(message.readShort()); } else if (int.class.equals(parameterType)) { values[i] = message.readInt(); } else if (Integer.class.equals(parameterType)) { values[i] = Integer.valueOf(message.readInt()); } else if (long.class.equals(parameterType)) { values[i] = message.readLong(); values[i] = Double.valueOf(message.readDouble()); } else if (String.class.equals(parameterType)) { final int bufLen = message.readInt(); final int resultLen = message.readBytes(this.buffer, bufLen); if (resultLen == bufLen) {
int length = bytesMessage.readInt();
final BytesMessage receivedMessage = (BytesMessage) consumer.receive(1000); if (receivedMessage != null) { final int receivedConsumerIndex = receivedMessage.readInt(); receivedMessages.getAndIncrement(receivedConsumerIndex); messagesRecieved.incrementAndGet();
return intMessage.readInt(); case LONG: if (!(message instanceof BytesMessage)) {
@Override protected void assertEquivalent(final Message m, final int mode, final boolean redelivered) throws JMSException { super.assertEquivalent(m, mode, redelivered); BytesMessage bm = (BytesMessage) m; ProxyAssertSupport.assertEquals(true, bm.readBoolean()); ProxyAssertSupport.assertEquals((byte) 3, bm.readByte()); byte[] bytes = new byte[3]; bm.readBytes(bytes); ProxyAssertSupport.assertEquals((byte) 4, bytes[0]); ProxyAssertSupport.assertEquals((byte) 5, bytes[1]); ProxyAssertSupport.assertEquals((byte) 6, bytes[2]); ProxyAssertSupport.assertEquals((char) 7, bm.readChar()); ProxyAssertSupport.assertEquals(new Double(8.0), new Double(bm.readDouble())); ProxyAssertSupport.assertEquals(new Float(9.0), new Float(bm.readFloat())); ProxyAssertSupport.assertEquals(10, bm.readInt()); ProxyAssertSupport.assertEquals(11L, bm.readLong()); ProxyAssertSupport.assertEquals((short) 12, bm.readShort()); ProxyAssertSupport.assertEquals("this is an UTF String", bm.readUTF()); }
@Test public void bytesMessage() throws Exception { context = cf.createContext(); try { JMSProducer producer = context.createProducer(); BytesMessage bMsg = context.createBytesMessage(); bMsg.setStringProperty("COM_SUN_JMS_TESTNAME", "sendAndRecvMsgOfEachTypeCLTest"); bMsg.writeByte((byte) 1); bMsg.writeInt(22); CountDownLatch latch = new CountDownLatch(1); SimpleCompletionListener listener = new SimpleCompletionListener(latch); producer.setAsync(listener); producer.send(queue1, bMsg); assertTrue(latch.await(5, TimeUnit.SECONDS)); assertEquals(listener.message.readByte(), (byte) 1); assertEquals(listener.message.readInt(), 22); } finally { context.close(); } }
assertEquals(99999L, bytesMessage.readLong()); assertEquals('h', bytesMessage.readChar()); assertEquals(987, bytesMessage.readInt()); assertEquals((short) 1099, bytesMessage.readShort()); assertEquals("hellobytes", bytesMessage.readUTF());
m.readInt(); ProxyAssertSupport.fail(); } catch (javax.jms.MessageNotReadableException e) { ProxyAssertSupport.assertEquals(myShort, m2.readShort()); ProxyAssertSupport.assertEquals(myChar, m2.readChar()); ProxyAssertSupport.assertEquals(myInt, m2.readInt()); ProxyAssertSupport.assertEquals(myLong, m2.readLong()); ProxyAssertSupport.assertEquals(myFloat, m2.readFloat(), 0); ProxyAssertSupport.assertEquals(myByte, m2.readByte()); ProxyAssertSupport.assertEquals(myShort, m2.readShort()); ProxyAssertSupport.assertEquals(myInt, m2.readInt()); ProxyAssertSupport.assertEquals(myLong, m2.readLong()); ProxyAssertSupport.assertEquals(myFloat, m2.readFloat(), 0); m2.readInt(); ProxyAssertSupport.fail(); } catch (MessageEOFException e) {