/** * Returns the full conversation transcript of a given session. * * @param sessionID the id of the session to get the full transcript. * @param workgroupJID the JID of the workgroup that will process the request. * @return the full conversation transcript of a given session. * @throws XMPPErrorException * @throws NoResponseException * @throws NotConnectedException * @throws InterruptedException */ public Transcript getTranscript(EntityBareJid workgroupJID, String sessionID) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { Transcript request = new Transcript(sessionID); request.setTo(workgroupJID); Transcript response = connection.createStanzaCollectorAndSend(request).nextResultOrThrow(); return response; }
/** * Returns the full conversation transcript of a given session. * * @param sessionID the id of the session to get the full transcript. * @param workgroupJID the JID of the workgroup that will process the request. * @return the full conversation transcript of a given session. * @throws XMPPException if an error occurs while getting the information. */ public Transcript getTranscript(String workgroupJID, String sessionID) throws XMPPException { Transcript request = new Transcript(sessionID); request.setTo(workgroupJID); PacketCollector collector = connection.createPacketCollector(new PacketIDFilter(request.getPacketID())); // Send the request connection.sendPacket(request); Transcript response = (Transcript) collector.nextResult(SmackConfiguration.getPacketReplyTimeout()); // Cancel the collector. collector.cancel(); if (response == null) { throw new XMPPException("No response from server on status set."); } if (response.getError() != null) { throw new XMPPException(response.getError()); } return response; }
/** * Returns the full conversation transcript of a given session. * * @param sessionID the id of the session to get the full transcript. * @param workgroupJID the JID of the workgroup that will process the request. * @return the full conversation transcript of a given session. * @throws XMPPException if an error occurs while getting the information. */ public Transcript getTranscript(String workgroupJID, String sessionID) throws XMPPException { Transcript request = new Transcript(sessionID); request.setTo(workgroupJID); PacketCollector collector = connection.createPacketCollector(new PacketIDFilter(request.getPacketID())); // Send the request connection.sendPacket(request); Transcript response = (Transcript) collector.nextResult(SmackConfiguration.getPacketReplyTimeout()); // Cancel the collector. collector.cancel(); if (response == null) { throw new XMPPException("No response from server on status set."); } if (response.getError() != null) { throw new XMPPException(response.getError()); } return response; }
/** * Returns the full conversation transcript of a given session. * * @param sessionID the id of the session to get the full transcript. * @param workgroupJID the JID of the workgroup that will process the request. * @return the full conversation transcript of a given session. * @throws XMPPException if an error occurs while getting the information. */ public Transcript getTranscript(String workgroupJID, String sessionID) throws XMPPException { Transcript request = new Transcript(sessionID); request.setTo(workgroupJID); PacketCollector collector = connection.createPacketCollector(new PacketIDFilter(request.getPacketID())); // Send the request connection.sendPacket(request); Transcript response = (Transcript) collector.nextResult(SmackConfiguration.getPacketReplyTimeout()); // Cancel the collector. collector.cancel(); if (response == null) { throw new XMPPException("No response from server on status set."); } if (response.getError() != null) { throw new XMPPException(response.getError()); } return response; }