1 46 package org.mr.api.jms; 47 48 import javax.jms.Message ; 49 import javax.jms.MessageListener ; 50 51 import org.mr.IMessageListener; 52 import org.mr.core.protocol.MantaBusMessage; 53 54 63 public class MessageListenerAdapter implements IMessageListener{ 64 65 public void setMessageListener(MessageListener messageListener){ 66 theMessageListener = messageListener; 67 } 69 public MessageListener getMessageListener(){ 70 return theMessageListener; 71 } 73 78 public void onMessage(MantaBusMessage message) { 79 80 if (message != null) { 81 theMessageListener.onMessage((Message )(message.getPayload())); 83 } } 86 private MessageListener theMessageListener = null; 87 } | Popular Tags |