@Test public void testAddValueToMessage() throws Exception { AdaptrisMessage message = createMessage(); ObjectMetadataCacheValueTranslator translator = new ObjectMetadataCacheValueTranslator(); translator.setMetadataKey(JmsConstants.OBJ_JMS_REPLY_TO_KEY); translator.addValueToMessage(message, new Queue() { @Override public String getQueueName() throws JMSException { return "HelloWorld"; } }); assertEquals("HelloWorld", ((Queue) message.getObjectHeaders().get(JmsConstants.OBJ_JMS_REPLY_TO_KEY)).getQueueName()); }
@Override public void addValueToMessage(AdaptrisMessage msg, Object value) throws CoreException { msg.addObjectHeader(getMetadataKey(), value); }
ObjectMetadataCacheValueTranslator implements CacheValueTranslator<Object> { @Override public void addValueToMessage(AdaptrisMessage msg, Object value) throws CoreException { msg.addObjectHeader(getMetadataKey(), value); } }
ObjectMetadataCacheValueTranslator implements CacheValueTranslator<Object> { @Override public void addValueToMessage(AdaptrisMessage msg, Object value) throws CoreException { msg.addObjectHeader(getMetadataKey(), value); } ObjectMetadataCacheValueTranslator();  ObjectMetadataCacheValueTranslator(String key); }
ObjectMetadataCacheValueTranslator implements CacheValueTranslator<Object> { @Override public void addValueToMessage(AdaptrisMessage msg, Object value) throws CoreException { msg.addObjectHeader(getMetadataKey(), value); } ObjectMetadataCacheValueTranslator();  ObjectMetadataCacheValueTranslator(String key); @Override Object getValueFromMessage(AdaptrisMessage msg); @Override void addValueToMessage(AdaptrisMessage msg, Object value); String getMetadataKey(); void setMetadataKey(String s); }
ObjectMetadataCacheValueTranslator implements CacheValueTranslator<Object> { @Override public void addValueToMessage(AdaptrisMessage msg, Object value) throws CoreException { msg.addObjectHeader(getMetadataKey(), value); } ObjectMetadataCacheValueTranslator();  ObjectMetadataCacheValueTranslator(String key); @Override Object getValueFromMessage(AdaptrisMessage msg); @Override void addValueToMessage(AdaptrisMessage msg, Object value); String getMetadataKey(); void setMetadataKey(String s);  }