code: public void departQueue() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
          // If not in the queue ignore the depart request.
          if (!inQueue) {
              return;
          }
  
          DepartQueuePacket departPacket = new DepartQueuePacket(this.workgroupJID);
          connection.createStanzaCollectorAndSend(departPacket).nextResultOrThrow();
  
          // Notify listeners that we're no longer in the queue.
          fireQueueDepartedEvent();
      }
docs: Departs the workgroup queue. If the user is not currently in the queue, this
  method will do nothing.<p>
  
  Normally, the user would not manually leave the queue. However, they may wish to
  under certain circumstances -- for example, if they no longer wish to be routed
  to an agent because they've been waiting too long.
  
  @throws XMPPErrorException if an error occurred trying to send the depart queue
  request to the server.
  @throws NoResponseException
  @throws NotConnectedException
  @throws InterruptedException