public abstract class AbstractXmppConversation extends Object implements XmppConversation
| Modifier and Type | Field and Description |
|---|---|
protected org.jivesoftware.smack.XMPPConnection |
connection |
protected org.apache.commons.logging.Log |
logger |
protected org.jivesoftware.smack.PacketCollector |
packetCollector |
protected String |
recipient |
| Constructor and Description |
|---|
AbstractXmppConversation(org.mule.api.endpoint.ImmutableEndpoint endpoint) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPacketListener(org.jivesoftware.smack.PacketListener listener)
Adds
listener to this conversation's XMPP connection. |
void |
connect()
Connect to the Jabber conversation, e.g.
|
void |
connect(boolean requiresCollector)
Connect to the Jabber conversation, e.g.
|
protected org.jivesoftware.smack.PacketCollector |
createPacketCollector() |
protected org.jivesoftware.smack.filter.PacketFilter |
createPacketFilter() |
void |
disconnect()
Disconnect from the Jabber conversation, e.g.
|
protected void |
doConnect()
Subclasses can override this method to create their conversation specific connection.
|
protected void |
doDisconnect()
Subclasses can override this method to perform custom disconnect actions.
|
org.jivesoftware.smack.packet.Message |
receive()
Wait for a response on this conversation until a message arrives.
|
org.jivesoftware.smack.packet.Message |
receive(long timeout)
Wait for a response on this conversation until
timeout occurs. |
void |
removePacketListener(org.jivesoftware.smack.PacketListener listener)
Removes
listener from this conversation's XMPP connection. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdispatchprotected final org.apache.commons.logging.Log logger
protected org.jivesoftware.smack.XMPPConnection connection
protected String recipient
protected org.jivesoftware.smack.PacketCollector packetCollector
public AbstractXmppConversation(org.mule.api.endpoint.ImmutableEndpoint endpoint)
public void connect()
throws org.mule.transport.ConnectException
XmppConversationconnect in interface XmppConversationorg.mule.transport.ConnectExceptionpublic void connect(boolean requiresCollector)
throws org.mule.transport.ConnectException
XmppConversationconnect in interface XmppConversationorg.mule.transport.ConnectExceptionprotected void doConnect()
throws org.mule.transport.ConnectException
org.mule.transport.ConnectExceptionprotected org.jivesoftware.smack.PacketCollector createPacketCollector()
PacketCollector that can be used to retrieve messages for this
conversation.protected org.jivesoftware.smack.filter.PacketFilter createPacketFilter()
PacketFilter instance that matches the desired message type and recipient
for this conversation.public void disconnect()
XmppConversationdisconnect in interface XmppConversationprotected void doDisconnect()
public void addPacketListener(org.jivesoftware.smack.PacketListener listener)
XmppConversationlistener to this conversation's XMPP connection.addPacketListener in interface XmppConversationpublic void removePacketListener(org.jivesoftware.smack.PacketListener listener)
XmppConversationlistener from this conversation's XMPP connection.removePacketListener in interface XmppConversationpublic org.jivesoftware.smack.packet.Message receive(long timeout)
XmppConversationtimeout occurs.receive in interface XmppConversationMessage next available message or null if timeout occurred.public org.jivesoftware.smack.packet.Message receive()
XmppConversationreceive in interface XmppConversationCopyright © 2003–2016 MuleSoft, Inc.. All rights reserved.