Package org.springframework.jms.support.converter

Examples of org.springframework.jms.support.converter.SimpleMessageConverter


    assertEquals(content, converter.fromMessage(msg));
  }

  @Test(expected=MessageConversionException.class)
  public void testToMessageThrowsExceptionIfGivenNullObjectToConvert() throws Exception {
    new SimpleMessageConverter().toMessage(null, null);
  }
View Full Code Here


    new SimpleMessageConverter().toMessage(null, null);
  }

  @Test(expected=MessageConversionException.class)
  public void testToMessageThrowsExceptionIfGivenIncompatibleObjectToConvert() throws Exception {
    new SimpleMessageConverter().toMessage(new Object(), null);
  }
View Full Code Here

  public void testToMessageSimplyReturnsMessageAsIsIfSuppliedWithMessage() throws JMSException {

    Session session = mock(Session.class);
    ObjectMessage message = mock(ObjectMessage.class);

    SimpleMessageConverter converter = new SimpleMessageConverter();
    Message msg = converter.toMessage(message, session);
    assertSame(message, msg);
  }
View Full Code Here

  @Test
  public void testFromMessageSimplyReturnsMessageAsIsIfSuppliedWithMessage() throws JMSException {

    Message message = mock(Message.class);

    SimpleMessageConverter converter = new SimpleMessageConverter();
    Object msg = converter.fromMessage(message);
    assertSame(message, msg);
  }
View Full Code Here

   * @see #setMessageConverter
   * @see org.springframework.jms.support.destination.DynamicDestinationResolver
   * @see org.springframework.jms.support.converter.SimpleMessageConverter
   */
  protected void initDefaultStrategies() {
    setMessageConverter(new SimpleMessageConverter());
  }
View Full Code Here

   * Initialize the default implementations for the adapter's strategies.
   * @see #setMessageConverter
   * @see org.springframework.jms.support.converter.SimpleMessageConverter
   */
  protected void initDefaultStrategies() {
    setMessageConverter(new SimpleMessageConverter());
  }
View Full Code Here

   * @see #setMessageConverter
   * @see org.springframework.jms.support.destination.DynamicDestinationResolver
   * @see org.springframework.jms.support.converter.SimpleMessageConverter
   */
  protected void initDefaultStrategies() {
    setMessageConverter(new SimpleMessageConverter());
  }
View Full Code Here

   * Initialize the default implementations for the adapter's strategies.
   * @see #setMessageConverter
   * @see org.springframework.jms.support.converter.SimpleMessageConverter
   */
  protected void initDefaultStrategies() {
    setMessageConverter(new SimpleMessageConverter());
  }
View Full Code Here

   * <p>Custom implementations may generally adapt Serializables into
   * special kinds of messages, or might be specifically tailored for
   * translating RemoteInvocation(Result)s into specific kinds of messages.
   */
  public void setMessageConverter(MessageConverter messageConverter) {
    this.messageConverter = (messageConverter != null ? messageConverter : new SimpleMessageConverter());
  }
View Full Code Here

        assertEquals(4, endpoint.getMaxConcurrentConsumers());

        endpoint.setMaxMessagesPerTask(9);
        assertEquals(9, endpoint.getMaxMessagesPerTask());

        endpoint.setMessageConverter(new SimpleMessageConverter());
        assertNotNull(endpoint.getMessageConverter());

        endpoint.setMessageIdEnabled(true);
        assertEquals(true, endpoint.isMessageIdEnabled());
View Full Code Here

TOP

Related Classes of org.springframework.jms.support.converter.SimpleMessageConverter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.