org.springframework.jms.support.JmsMessageHeaderAccessor Java Examples
The following examples show how to use
org.springframework.jms.support.JmsMessageHeaderAccessor.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MethodJmsListenerEndpointTests.java From spring-analysis-note with MIT License | 5 votes |
@Test public void resolveJmsMessageHeaderAccessor() throws JMSException { MessagingMessageListenerAdapter listener = createDefaultInstance(JmsMessageHeaderAccessor.class); Session session = mock(Session.class); StubTextMessage message = createSimpleJmsTextMessage("my payload"); message.setBooleanProperty("customBoolean", true); message.setJMSPriority(9); listener.onMessage(message, session); assertDefaultListenerMethodInvocation(); }
Example #2
Source File: MethodJmsListenerEndpointTests.java From java-technology-stack with MIT License | 5 votes |
@Test public void resolveJmsMessageHeaderAccessor() throws JMSException { MessagingMessageListenerAdapter listener = createDefaultInstance(JmsMessageHeaderAccessor.class); Session session = mock(Session.class); StubTextMessage message = createSimpleJmsTextMessage("my payload"); message.setBooleanProperty("customBoolean", true); message.setJMSPriority(9); listener.onMessage(message, session); assertDefaultListenerMethodInvocation(); }
Example #3
Source File: MethodJmsListenerEndpointTests.java From spring4-understanding with Apache License 2.0 | 5 votes |
@Test public void resolveJmsMessageHeaderAccessor() throws JMSException { MessagingMessageListenerAdapter listener = createDefaultInstance(JmsMessageHeaderAccessor.class); Session session = mock(Session.class); StubTextMessage message = createSimpleJmsTextMessage("my payload"); message.setBooleanProperty("customBoolean", true); message.setJMSPriority(9); listener.onMessage(message, session); assertDefaultListenerMethodInvocation(); }
Example #4
Source File: MethodJmsListenerEndpointTests.java From spring-analysis-note with MIT License | 4 votes |
public void resolveJmsMessageHeaderAccessor(JmsMessageHeaderAccessor headers) { this.invocations.put("resolveJmsMessageHeaderAccessor", true); assertNotNull("MessageHeaders not injected", headers); assertEquals("Missing JMS message priority header", Integer.valueOf(9), headers.getPriority()); assertEquals("Missing custom header", true, headers.getHeader("customBoolean")); }
Example #5
Source File: MethodJmsListenerEndpointTests.java From java-technology-stack with MIT License | 4 votes |
public void resolveJmsMessageHeaderAccessor(JmsMessageHeaderAccessor headers) { this.invocations.put("resolveJmsMessageHeaderAccessor", true); assertNotNull("MessageHeaders not injected", headers); assertEquals("Missing JMS message priority header", Integer.valueOf(9), headers.getPriority()); assertEquals("Missing custom header", true, headers.getHeader("customBoolean")); }
Example #6
Source File: MethodJmsListenerEndpointTests.java From spring4-understanding with Apache License 2.0 | 4 votes |
public void resolveJmsMessageHeaderAccessor(JmsMessageHeaderAccessor headers) { invocations.put("resolveJmsMessageHeaderAccessor", true); assertNotNull("MessageHeaders not injected", headers); assertEquals("Missing JMS message priority header", Integer.valueOf(9), headers.getPriority()); assertEquals("Missing custom header", true, headers.getHeader("customBoolean")); }