protected UMOMessage doSend(UMOEvent event) throws Exception { sendMessage(event); if (useRemoteSync(event)) { Message response; if (groupChat != null) { response = groupChat.nextMessage(event.getTimeout()); } else { response = chat.nextMessage(event.getTimeout()); } if (response != null) { if (logger.isDebugEnabled()) { logger.debug("Got a response from chat: " + chat); } return new MuleMessage(connector.getMessageAdapter(response)); } } return null; }
public UMOConnector getConnector() throws Exception { XmppConnector cnn = new XmppConnector(); cnn.setName("xmppConnector"); cnn.initialise(); return cnn; }
protected void doConnect() throws Exception { if (xmppConnection == null) { UMOEndpointURI uri = endpoint.getEndpointURI(); xmppConnection = connector.createXmppConnection(uri); } }