Class AgentSession

java.lang.Object
org.jivesoftware.smackx.workgroup.agent.AgentSession

public class AgentSession extends Object
This class embodies the agent's active presence within a given workgroup. The application should have N instances of this class, where N is the number of workgroups to which the owning agent of the application belongs. This class provides all functionality that a session within a given workgroup is expected to have from an agent's perspective -- setting the status, tracking the status of queues to which the agent belongs within the workgroup, and dequeuing customers.
  • Constructor Details

    • AgentSession

      public AgentSession(org.jxmpp.jid.EntityBareJid workgroupJID, org.jivesoftware.smack.XMPPConnection connection)
      Constructs a new agent session instance. Note, the setOnline(boolean) method must be called with an argument of true to mark the agent as available to accept chat requests.
      Parameters:
      connection - a connection instance which must have already gone through authentication.
      workgroupJID - the fully qualified JID of the workgroup.
  • Method Details

    • close

      public void close()
      Close the agent session. The underlying connection will remain opened but the stanza listeners that were added by this agent session will be removed.
    • getAgentRoster

      public AgentRoster getAgentRoster() throws org.jivesoftware.smack.SmackException.NotConnectedException, InterruptedException
      Returns the agent roster for the workgroup, which contains.
      Returns:
      the AgentRoster
      Throws:
      org.jivesoftware.smack.SmackException.NotConnectedException - if the XMPP connection is not connected.
      InterruptedException - if the calling thread was interrupted.
    • getPresenceMode

      public org.jivesoftware.smack.packet.Presence.Mode getPresenceMode()
      Returns the agent's current presence mode.
      Returns:
      the agent's current presence mode.
    • getMaxChats

      public int getMaxChats()
      Returns the maximum number of chats the agent can participate in.
      Returns:
      the maximum number of chats the agent can participate in.
    • isOnline

      public boolean isOnline()
      Returns true if the agent is online with the workgroup.
      Returns:
      true if the agent is online with the workgroup.
    • setMetaData

      public void setMetaData(String key, String val) throws org.jivesoftware.smack.XMPPException, org.jivesoftware.smack.SmackException, InterruptedException
      Allows the addition of a new key-value pair to the agent's meta data, if the value is new data, the revised meta data will be rebroadcast in an agent's presence broadcast.
      Parameters:
      key - the meta data key
      val - the non-null meta data value
      Throws:
      org.jivesoftware.smack.XMPPException - if an exception occurs.
      org.jivesoftware.smack.SmackException - if Smack detected an exceptional situation.
      InterruptedException - if the calling thread was interrupted.
    • removeMetaData

      public void removeMetaData(String key) throws org.jivesoftware.smack.XMPPException, org.jivesoftware.smack.SmackException, InterruptedException
      Allows the removal of data from the agent's meta data, if the key represents existing data, the revised meta data will be rebroadcast in an agent's presence broadcast.
      Parameters:
      key - the meta data key.
      Throws:
      org.jivesoftware.smack.XMPPException - if an exception occurs.
      org.jivesoftware.smack.SmackException - if Smack detected an exceptional situation.
      InterruptedException - if the calling thread was interrupted.
    • getMetaData

      public List<String> getMetaData(String key)
      Allows the retrieval of meta data for a specified key.
      Parameters:
      key - the meta data key
      Returns:
      the meta data value associated with the key or null if the meta-data doesn't exist..
    • setOnline

      public void setOnline(boolean online) throws org.jivesoftware.smack.XMPPException, org.jivesoftware.smack.SmackException, InterruptedException
      Sets whether the agent is online with the workgroup. If the user tries to go online with the workgroup but is not allowed to be an agent, an XMPPError with error code 401 will be thrown.
      Parameters:
      online - true to set the agent as online with the workgroup.
      Throws:
      org.jivesoftware.smack.XMPPException - if an error occurs setting the online status.
      org.jivesoftware.smack.SmackException - assertEquals(SmackException.Type.NO_RESPONSE_FROM_SERVER, e.getType()); return;
      InterruptedException - if the calling thread was interrupted.
    • setStatus

      public void setStatus(org.jivesoftware.smack.packet.Presence.Mode presenceMode, int maxChats) throws org.jivesoftware.smack.XMPPException, org.jivesoftware.smack.SmackException, InterruptedException
      Sets the agent's current status with the workgroup. The presence mode affects how offers are routed to the agent. The possible presence modes with their meanings are as follows:
      • Presence.Mode.AVAILABLE -- (Default) the agent is available for more chats (equivalent to Presence.Mode.CHAT).
      • Presence.Mode.DO_NOT_DISTURB -- the agent is busy and should not be disturbed. However, special case, or extreme urgency chats may still be offered to the agent.
      • Presence.Mode.AWAY -- the agent is not available and should not have a chat routed to them (equivalent to Presence.Mode.EXTENDED_AWAY).
      The max chats value is the maximum number of chats the agent is willing to have routed to them at once. Some servers may be configured to only accept max chat values in a certain range; for example, between two and five. In that case, the maxChats value the agent sends may be adjusted by the server to a value within that range.
      Parameters:
      presenceMode - the presence mode of the agent.
      maxChats - the maximum number of chats the agent is willing to accept.
      Throws:
      org.jivesoftware.smack.XMPPException - if an error occurs setting the agent status.
      org.jivesoftware.smack.SmackException - if Smack detected an exceptional situation.
      InterruptedException - if the calling thread was interrupted.
      IllegalStateException - if the agent is not online with the workgroup.
    • setStatus

      public void setStatus(org.jivesoftware.smack.packet.Presence.Mode presenceMode, int maxChats, String status) throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, InterruptedException
      Sets the agent's current status with the workgroup. The presence mode affects how offers are routed to the agent. The possible presence modes with their meanings are as follows:
      • Presence.Mode.AVAILABLE -- (Default) the agent is available for more chats (equivalent to Presence.Mode.CHAT).
      • Presence.Mode.DO_NOT_DISTURB -- the agent is busy and should not be disturbed. However, special case, or extreme urgency chats may still be offered to the agent.
      • Presence.Mode.AWAY -- the agent is not available and should not have a chat routed to them (equivalent to Presence.Mode.EXTENDED_AWAY).
      The max chats value is the maximum number of chats the agent is willing to have routed to them at once. Some servers may be configured to only accept max chat values in a certain range; for example, between two and five. In that case, the maxChats value the agent sends may be adjusted by the server to a value within that range.
      Parameters:
      presenceMode - the presence mode of the agent.
      maxChats - the maximum number of chats the agent is willing to accept.
      status - sets the status message of the presence update.
      Throws:
      org.jivesoftware.smack.XMPPException.XMPPErrorException - if there was an XMPP error returned.
      org.jivesoftware.smack.SmackException.NoResponseException - if there was no response from the remote entity.
      org.jivesoftware.smack.SmackException.NotConnectedException - if the XMPP connection is not connected.
      InterruptedException - if the calling thread was interrupted.
      IllegalStateException - if the agent is not online with the workgroup.
    • setStatus

      public void setStatus(org.jivesoftware.smack.packet.Presence.Mode presenceMode, String status) throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, InterruptedException
      Sets the agent's current status with the workgroup. The presence mode affects how offers are routed to the agent. The possible presence modes with their meanings are as follows:
      • Presence.Mode.AVAILABLE -- (Default) the agent is available for more chats (equivalent to Presence.Mode.CHAT).
      • Presence.Mode.DO_NOT_DISTURB -- the agent is busy and should not be disturbed. However, special case, or extreme urgency chats may still be offered to the agent.
      • Presence.Mode.AWAY -- the agent is not available and should not have a chat routed to them (equivalent to Presence.Mode.EXTENDED_AWAY).
      Parameters:
      presenceMode - the presence mode of the agent.
      status - sets the status message of the presence update.
      Throws:
      org.jivesoftware.smack.XMPPException.XMPPErrorException - if there was an XMPP error returned.
      org.jivesoftware.smack.SmackException.NoResponseException - if there was no response from the remote entity.
      org.jivesoftware.smack.SmackException.NotConnectedException - if the XMPP connection is not connected.
      InterruptedException - if the calling thread was interrupted.
      IllegalStateException - if the agent is not online with the workgroup.
    • dequeueUser

      public void dequeueUser(org.jxmpp.jid.EntityJid userID) throws org.jivesoftware.smack.XMPPException, org.jivesoftware.smack.SmackException.NotConnectedException, InterruptedException
      Removes a user from the workgroup queue. This is an administrative action that the The agent is not guaranteed of having privileges to perform this action; an exception denying the request may be thrown.
      Parameters:
      userID - the ID of the user to remove.
      Throws:
      org.jivesoftware.smack.XMPPException - if an exception occurs.
      org.jivesoftware.smack.SmackException.NotConnectedException - if the XMPP connection is not connected.
      InterruptedException - if the calling thread was interrupted.
    • getTranscripts

      public Transcripts getTranscripts(org.jxmpp.jid.Jid userID) throws org.jivesoftware.smack.XMPPException, org.jivesoftware.smack.SmackException, InterruptedException
      Returns the transcripts of a given user. The answer will contain the complete history of conversations that a user had.
      Parameters:
      userID - the id of the user to get his conversations.
      Returns:
      the transcripts of a given user.
      Throws:
      org.jivesoftware.smack.XMPPException - if an error occurs while getting the information.
      org.jivesoftware.smack.SmackException - if Smack detected an exceptional situation.
      InterruptedException - if the calling thread was interrupted.
    • getTranscript

      public Transcript getTranscript(String sessionID) throws org.jivesoftware.smack.XMPPException, org.jivesoftware.smack.SmackException, InterruptedException
      Returns the full conversation transcript of a given session.
      Parameters:
      sessionID - the id of the session to get the full transcript.
      Returns:
      the full conversation transcript of a given session.
      Throws:
      org.jivesoftware.smack.XMPPException - if an error occurs while getting the information.
      org.jivesoftware.smack.SmackException - if Smack detected an exceptional situation.
      InterruptedException - if the calling thread was interrupted.
    • getTranscriptSearchForm

      public org.jivesoftware.smackx.xdata.form.Form getTranscriptSearchForm() throws org.jivesoftware.smack.XMPPException, org.jivesoftware.smack.SmackException, InterruptedException
      Returns the Form to use for searching transcripts. It is unlikely that the server will change the form (without a restart) so it is safe to keep the returned form for future submissions.
      Returns:
      the Form to use for searching transcripts.
      Throws:
      org.jivesoftware.smack.XMPPException - if an error occurs while sending the request to the server.
      org.jivesoftware.smack.SmackException - if Smack detected an exceptional situation.
      InterruptedException - if the calling thread was interrupted.
    • searchTranscripts

      public org.jivesoftware.smackx.search.ReportedData searchTranscripts(org.jivesoftware.smackx.xdata.form.FillableForm completedForm) throws org.jivesoftware.smack.XMPPException, org.jivesoftware.smack.SmackException, InterruptedException
      Submits the completed form and returns the result of the transcript search. The result will include all the data returned from the server so be careful with the amount of data that the search may return.
      Parameters:
      completedForm - the filled out search form.
      Returns:
      the result of the transcript search.
      Throws:
      org.jivesoftware.smack.SmackException - if Smack detected an exceptional situation.
      org.jivesoftware.smack.XMPPException - if an XMPP protocol error was received.
      InterruptedException - if the calling thread was interrupted.
    • getOccupantsInfo

      public OccupantsInfo getOccupantsInfo(String roomID) throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, InterruptedException
      Asks the workgroup for information about the occupants of the specified room. The returned information will include the real JID of the occupants, the nickname of the user in the room as well as the date when the user joined the room.
      Parameters:
      roomID - the room to get information about its occupants.
      Returns:
      information about the occupants of the specified room.
      Throws:
      org.jivesoftware.smack.XMPPException.XMPPErrorException - if there was an XMPP error returned.
      org.jivesoftware.smack.SmackException.NoResponseException - if there was no response from the remote entity.
      org.jivesoftware.smack.SmackException.NotConnectedException - if the XMPP connection is not connected.
      InterruptedException - if the calling thread was interrupted.
    • getWorkgroupJID

      public org.jxmpp.jid.Jid getWorkgroupJID()
      Get workgroup JID.
      Returns:
      the fully-qualified name of the workgroup for which this session exists
    • getAgent

      public Agent getAgent()
      Returns the Agent associated to this session.
      Returns:
      the Agent associated to this session.
    • getQueue

      public WorkgroupQueue getQueue(String queueName)
      Get queue.
      Parameters:
      queueName - the name of the queue
      Returns:
      an instance of WorkgroupQueue for the argument queue name, or null if none exists
    • getQueue

      public WorkgroupQueue getQueue(org.jxmpp.jid.parts.Resourcepart queueName)
      Get queue.
      Parameters:
      queueName - the name of the queue
      Returns:
      an instance of WorkgroupQueue for the argument queue name, or null if none exists
    • getQueues

      public Iterator<WorkgroupQueue> getQueues()
    • addQueueUsersListener

      public void addQueueUsersListener(QueueUsersListener listener)
    • removeQueueUsersListener

      public void removeQueueUsersListener(QueueUsersListener listener)
    • addOfferListener

      public void addOfferListener(OfferListener offerListener)
      Adds an offer listener.
      Parameters:
      offerListener - the offer listener.
    • removeOfferListener

      public void removeOfferListener(OfferListener offerListener)
      Removes an offer listener.
      Parameters:
      offerListener - the offer listener.
    • addInvitationListener

      public void addInvitationListener(WorkgroupInvitationListener invitationListener)
      Adds an invitation listener.
      Parameters:
      invitationListener - the invitation listener.
    • removeInvitationListener

      public void removeInvitationListener(WorkgroupInvitationListener invitationListener)
      Removes an invitation listener.
      Parameters:
      invitationListener - the invitation listener.
    • setNote

      public void setNote(String sessionID, String note) throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, InterruptedException
      Creates a ChatNote that will be mapped to the given chat session.
      Parameters:
      sessionID - the session id of a Chat Session.
      note - the chat note to add.
      Throws:
      org.jivesoftware.smack.XMPPException.XMPPErrorException - if there was an XMPP error returned.
      org.jivesoftware.smack.SmackException.NoResponseException - if there was no response from the remote entity.
      org.jivesoftware.smack.SmackException.NotConnectedException - if the XMPP connection is not connected.
      InterruptedException - if the calling thread was interrupted.
    • getNote

      public ChatNotes getNote(String sessionID) throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, InterruptedException
      Retrieves the ChatNote associated with a given chat session.
      Parameters:
      sessionID - the sessionID of the chat session.
      Returns:
      the ChatNote associated with a given chat session.
      Throws:
      org.jivesoftware.smack.XMPPException.XMPPErrorException - if an error occurs while retrieving the ChatNote.
      org.jivesoftware.smack.SmackException.NoResponseException - if there was no response from the remote entity.
      org.jivesoftware.smack.SmackException.NotConnectedException - if the XMPP connection is not connected.
      InterruptedException - if the calling thread was interrupted.
    • getAgentHistory

      public AgentChatHistory getAgentHistory(org.jxmpp.jid.EntityBareJid jid, int maxSessions, Date startDate) throws org.jivesoftware.smack.XMPPException, org.jivesoftware.smack.SmackException.NotConnectedException, InterruptedException, org.jivesoftware.smack.SmackException.NoResponseException
      Retrieves the AgentChatHistory associated with a particular agent jid.
      Parameters:
      jid - the jid of the agent.
      maxSessions - the max number of sessions to retrieve.
      startDate - point in time from which on history should get retrieved.
      Returns:
      the chat history associated with a given jid.
      Throws:
      org.jivesoftware.smack.XMPPException - if an error occurs while retrieving the AgentChatHistory.
      org.jivesoftware.smack.SmackException.NotConnectedException - if the XMPP connection is not connected.
      InterruptedException - if the calling thread was interrupted.
      org.jivesoftware.smack.SmackException.NoResponseException - if there was no response from the remote entity.
    • getSearchSettings

      public SearchSettings getSearchSettings() throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, InterruptedException
      Asks the workgroup for it's Search Settings.
      Returns:
      SearchSettings the search settings for this workgroup.
      Throws:
      org.jivesoftware.smack.XMPPException.XMPPErrorException - if there was an XMPP error returned.
      org.jivesoftware.smack.SmackException.NoResponseException - if there was no response from the remote entity.
      org.jivesoftware.smack.SmackException.NotConnectedException - if the XMPP connection is not connected.
      InterruptedException - if the calling thread was interrupted.
    • getMacros

      public MacroGroup getMacros(boolean global) throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, InterruptedException
      Asks the workgroup for it's Global Macros.
      Parameters:
      global - true to retrieve global macros, otherwise false for personal macros.
      Returns:
      MacroGroup the root macro group.
      Throws:
      org.jivesoftware.smack.XMPPException.XMPPErrorException - if an error occurs while getting information from the server.
      org.jivesoftware.smack.SmackException.NoResponseException - if there was no response from the remote entity.
      org.jivesoftware.smack.SmackException.NotConnectedException - if the XMPP connection is not connected.
      InterruptedException - if the calling thread was interrupted.
    • saveMacros

      public void saveMacros(MacroGroup group) throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, InterruptedException
      Persists the Personal Macro for an agent.
      Parameters:
      group - the macro group to save.
      Throws:
      org.jivesoftware.smack.XMPPException.XMPPErrorException - if there was an XMPP error returned.
      org.jivesoftware.smack.SmackException.NoResponseException - if there was no response from the remote entity.
      org.jivesoftware.smack.SmackException.NotConnectedException - if the XMPP connection is not connected.
      InterruptedException - if the calling thread was interrupted.
    • getChatMetadata

      public Map<String,List<String>> getChatMetadata(String sessionID) throws org.jivesoftware.smack.XMPPException, org.jivesoftware.smack.SmackException.NotConnectedException, InterruptedException, org.jivesoftware.smack.SmackException.NoResponseException
      Query for metadata associated with a session id.
      Parameters:
      sessionID - the sessionID to query for.
      Returns:
      Map a map of all metadata associated with the sessionID.
      Throws:
      org.jivesoftware.smack.XMPPException - if an error occurs while getting information from the server.
      org.jivesoftware.smack.SmackException.NotConnectedException - if the XMPP connection is not connected.
      InterruptedException - if the calling thread was interrupted.
      org.jivesoftware.smack.SmackException.NoResponseException - if there was no response from the remote entity.
    • sendRoomInvitation

      public void sendRoomInvitation(RoomInvitation.Type type, org.jxmpp.jid.Jid invitee, String sessionID, String reason) throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, InterruptedException
      Invites a user or agent to an existing session support. The provided invitee's JID can be of a user, an agent, a queue or a workgroup. In the case of a queue or a workgroup the workgroup service will decide the best agent to receive the invitation.

      This method will return either when the service returned an ACK of the request or if an error occurred while requesting the invitation. After sending the ACK the service will send the invitation to the target entity. When dealing with agents the common sequence of offer-response will be followed. However, when sending an invitation to a user a standard MUC invitation will be sent.

      The agent or user that accepted the offer MUST join the room. Failing to do so will make the invitation to fail. The inviter will eventually receive a message error indicating that the invitee accepted the offer but failed to join the room. Different situations may lead to a failed invitation. Possible cases are: 1) all agents rejected the offer and there are no agents available, 2) the agent that accepted the offer failed to join the room or 2) the user that received the MUC invitation never replied or joined the room. In any of these cases (or other failing cases) the inviter will get an error message with the failed notification.

      Parameters:
      type - type of entity that will get the invitation.
      invitee - JID of entity that will get the invitation.
      sessionID - ID of the support session that the invitee is being invited.
      reason - the reason of the invitation.
      Throws:
      org.jivesoftware.smack.XMPPException.XMPPErrorException - if the sender of the invitation is not an agent or the service failed to process the request.
      org.jivesoftware.smack.SmackException.NoResponseException - if there was no response from the remote entity.
      org.jivesoftware.smack.SmackException.NotConnectedException - if the XMPP connection is not connected.
      InterruptedException - if the calling thread was interrupted.
    • sendRoomTransfer

      public void sendRoomTransfer(RoomTransfer.Type type, String invitee, String sessionID, String reason) throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, InterruptedException
      Transfer an existing session support to another user or agent. The provided invitee's JID can be of a user, an agent, a queue or a workgroup. In the case of a queue or a workgroup the workgroup service will decide the best agent to receive the invitation.

      This method will return either when the service returned an ACK of the request or if an error occurred while requesting the transfer. After sending the ACK the service will send the invitation to the target entity. When dealing with agents the common sequence of offer-response will be followed. However, when sending an invitation to a user a standard MUC invitation will be sent.

      Once the invitee joins the support room the workgroup service will kick the inviter from the room.

      Different situations may lead to a failed transfers. Possible cases are: 1) all agents rejected the offer and there are no agents available, 2) the agent that accepted the offer failed to join the room or 2) the user that received the MUC invitation never replied or joined the room. In any of these cases (or other failing cases) the inviter will get an error message with the failed notification.

      Parameters:
      type - type of entity that will get the invitation.
      invitee - JID of entity that will get the invitation.
      sessionID - ID of the support session that the invitee is being invited.
      reason - the reason of the invitation.
      Throws:
      org.jivesoftware.smack.XMPPException.XMPPErrorException - if the sender of the invitation is not an agent or the service failed to process the request.
      org.jivesoftware.smack.SmackException.NoResponseException - if there was no response from the remote entity.
      org.jivesoftware.smack.SmackException.NotConnectedException - if the XMPP connection is not connected.
      InterruptedException - if the calling thread was interrupted.
    • getGenericSettings

      public GenericSettings getGenericSettings(org.jivesoftware.smack.XMPPConnection con, String query) throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, InterruptedException
      Returns the generic metadata of the workgroup the agent belongs to.
      Parameters:
      con - the XMPPConnection to use.
      query - an optional query object used to tell the server what metadata to retrieve. This can be null.
      Returns:
      the settings for the workgroup.
      Throws:
      org.jivesoftware.smack.XMPPException.XMPPErrorException - if an error occurs while sending the request to the server.
      org.jivesoftware.smack.SmackException.NoResponseException - if there was no response from the remote entity.
      org.jivesoftware.smack.SmackException.NotConnectedException - if the XMPP connection is not connected.
      InterruptedException - if the calling thread was interrupted.
    • hasMonitorPrivileges

      public boolean hasMonitorPrivileges(org.jivesoftware.smack.XMPPConnection con) throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, InterruptedException
      Throws:
      org.jivesoftware.smack.SmackException.NoResponseException
      org.jivesoftware.smack.XMPPException.XMPPErrorException
      org.jivesoftware.smack.SmackException.NotConnectedException
      InterruptedException
    • makeRoomOwner

      public void makeRoomOwner(org.jivesoftware.smack.XMPPConnection con, String sessionID) throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, InterruptedException
      Throws:
      org.jivesoftware.smack.SmackException.NoResponseException
      org.jivesoftware.smack.XMPPException.XMPPErrorException
      org.jivesoftware.smack.SmackException.NotConnectedException
      InterruptedException