@Test public void testGetOutputStreamReturnsSameStream() throws Exception { AmqpJmsBytesMessageFacade amqpBytesMessageFacade = createNewBytesMessageFacade(); OutputStream os1 = amqpBytesMessageFacade.getOutputStream(); OutputStream os2 = amqpBytesMessageFacade.getOutputStream(); assertSame("Got different output streams", os1, os2); }
@Override public OutputStream getOutputStream() throws JMSException { if (bytesIn != null) { throw new IllegalStateException("Body is being read from, cannot perform a write."); } if (bytesOut == null) { bytesOut = new ByteBufOutputStream(Unpooled.buffer()); setBody(EMPTY_BODY); } return bytesOut; }
AmqpJmsBytesMessageFacade extends AmqpJmsMessageFacade implements JmsBytesMessageFacade { @Override public OutputStream getOutputStream() throws JMSException { if (bytesIn != null) { throw new IllegalStateException("Body is being read from, cannot perform a write."); } if (bytesOut == null) { bytesOut = new ByteBufOutputStream(Unpooled.buffer()); setBody(EMPTY_BODY); } return bytesOut; } }
AmqpJmsBytesMessageFacade extends AmqpJmsMessageFacade implements JmsBytesMessageFacade { @Override public OutputStream getOutputStream() throws JMSException { if (bytesIn != null) { throw new IllegalStateException("Body is being read from, cannot perform a write."); } if (bytesOut == null) { bytesOut = new ByteBufOutputStream(Unpooled.buffer()); setBody(EMPTY_BODY); } return bytesOut; }  }
AmqpJmsBytesMessageFacade extends AmqpJmsMessageFacade implements JmsBytesMessageFacade { @Override public OutputStream getOutputStream() throws JMSException { if (bytesIn != null) { throw new IllegalStateException("Body is being read from, cannot perform a write."); } if (bytesOut == null) { bytesOut = new ByteBufOutputStream(Unpooled.buffer()); setBody(EMPTY_BODY); } return bytesOut; }  @Override AmqpJmsBytesMessageFacade copy(); @Override byte getJmsMsgType(); @Override void clearBody(); @Override InputStream getInputStream(); @Override OutputStream getOutputStream(); @Override void reset(); @Override int getBodyLength(); @Override boolean hasBody(); @Override JmsBytesMessage asJmsMessage(); @Override byte[] copyBody(); @Override void onSend(long producerTtl); }
AmqpJmsBytesMessageFacade extends AmqpJmsMessageFacade implements JmsBytesMessageFacade { @Override public OutputStream getOutputStream() throws JMSException { if (bytesIn != null) { throw new IllegalStateException("Body is being read from, cannot perform a write."); } if (bytesOut == null) { bytesOut = new ByteBufOutputStream(Unpooled.buffer()); setBody(EMPTY_BODY); } return bytesOut; }  @Override AmqpJmsBytesMessageFacade copy(); @Override byte getJmsMsgType(); @Override void clearBody(); @Override InputStream getInputStream(); @Override OutputStream getOutputStream(); @Override void reset(); @Override int getBodyLength(); @Override boolean hasBody(); @Override JmsBytesMessage asJmsMessage(); @Override byte[] copyBody(); @Override void onSend(long producerTtl);  }