Exemplo n.º 1
0
 /**
  * Informs message listeners if present that new outbound message is about to be sent.
  *
  * @param message
  */
 public void onOutboundMessage(Message message) {
   if (messageListeners != null && !messageListeners.isEmpty()) {
     messageListeners.onOutboundMessage(message, this);
   } else {
     if (log.isDebugEnabled()) {
       log.debug("Sent message:" + System.getProperty("line.separator") + message.toString());
     }
   }
 }
Exemplo n.º 2
0
 /**
  * Informs message listeners if present that inbound message was received.
  *
  * @param receivedMessage
  */
 public void onInboundMessage(Message receivedMessage) {
   if (messageListeners != null && !messageListeners.isEmpty()) {
     messageListeners.onInboundMessage(receivedMessage, this);
   } else {
     if (log.isDebugEnabled()) {
       log.debug(
           "Received message:"
               + System.getProperty("line.separator")
               + (receivedMessage != null ? receivedMessage.toString() : ""));
     }
   }
 }