@Test public void testCreateBytesMessage() throws JMSException { AmqpJmsMessageFactory factory = new AmqpJmsMessageFactory(createMockAmqpConnection()); JmsBytesMessage message = factory.createBytesMessage(); JmsBytesMessageFacade facade = (JmsBytesMessageFacade) message.getFacade(); assertTrue(facade instanceof AmqpJmsBytesMessageFacade); AmqpJmsBytesMessageFacade amqpMessage = (AmqpJmsBytesMessageFacade) facade; assertEquals(JMS_BYTES_MESSAGE, amqpMessage.getJmsMsgType()); assertEquals(0, amqpMessage.getBodyLength()); }
@Override public JmsBytesMessage createBytesMessage() throws JMSException { AmqpJmsBytesMessageFacade facade = new AmqpJmsBytesMessageFacade(); facade.initialize(connection); return facade.asJmsMessage(); }
AmqpJmsMessageFactory implements JmsMessageFactory { @Override public JmsBytesMessage createBytesMessage() throws JMSException { AmqpJmsBytesMessageFacade facade = new AmqpJmsBytesMessageFacade(); facade.initialize(connection); return facade.asJmsMessage(); } }
AmqpJmsMessageFactory implements JmsMessageFactory { @Override public JmsBytesMessage createBytesMessage() throws JMSException { AmqpJmsBytesMessageFacade facade = new AmqpJmsBytesMessageFacade(); facade.initialize(connection); return facade.asJmsMessage(); } AmqpJmsMessageFactory(AmqpConnection connection); }
AmqpJmsMessageFactory implements JmsMessageFactory { @Override public JmsBytesMessage createBytesMessage() throws JMSException { AmqpJmsBytesMessageFacade facade = new AmqpJmsBytesMessageFacade(); facade.initialize(connection); return facade.asJmsMessage(); } AmqpJmsMessageFactory(AmqpConnection connection); AmqpConnection getAmqpConnection(); @Override JmsMessage createMessage(); @Override JmsTextMessage createTextMessage(); @Override JmsTextMessage createTextMessage(String payload); @Override JmsBytesMessage createBytesMessage(); @Override JmsMapMessage createMapMessage(); @Override JmsStreamMessage createStreamMessage(); @Override JmsObjectMessage createObjectMessage(); @Override JmsObjectMessage createObjectMessage(Serializable payload); }
AmqpJmsMessageFactory implements JmsMessageFactory { @Override public JmsBytesMessage createBytesMessage() throws JMSException { AmqpJmsBytesMessageFacade facade = new AmqpJmsBytesMessageFacade(); facade.initialize(connection); return facade.asJmsMessage(); } AmqpJmsMessageFactory(AmqpConnection connection); AmqpConnection getAmqpConnection(); @Override JmsMessage createMessage(); @Override JmsTextMessage createTextMessage(); @Override JmsTextMessage createTextMessage(String payload); @Override JmsBytesMessage createBytesMessage(); @Override JmsMapMessage createMapMessage(); @Override JmsStreamMessage createStreamMessage(); @Override JmsObjectMessage createObjectMessage(); @Override JmsObjectMessage createObjectMessage(Serializable payload);  }