Java 类org.jivesoftware.smackx.search.ReportedData 实例源码

项目:Smack    文件:TranscriptSearchManager.java   
/**
 * 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.
 *
 * @param serviceJID    the address of the workgroup service.
 * @param completedForm the filled out search form.
 * @return the result of the transcript search.
 * @throws XMPPErrorException 
 * @throws NoResponseException 
 * @throws NotConnectedException 
 */
public ReportedData submitSearch(String serviceJID, Form completedForm) throws NoResponseException, XMPPErrorException, NotConnectedException {
    TranscriptSearch search = new TranscriptSearch();
    search.setType(IQ.Type.get);
    search.setTo(serviceJID);
    search.addExtension(completedForm.getDataFormToSend());

    TranscriptSearch response = (TranscriptSearch) connection.createPacketCollectorAndSend(
                    search).nextResultOrThrow();
    return ReportedData.getReportedDataFrom(response);
}
项目:Smack    文件:AgentSession.java   
/**
 * 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.
 *
 * @param completedForm the filled out search form.
 * @return the result of the transcript search.
 * @throws SmackException 
 * @throws XMPPException 
 */
public ReportedData searchTranscripts(Form completedForm) throws XMPPException, SmackException {
    return transcriptSearchManager.submitSearch(XmppStringUtils.parseDomain(workgroupJID),
            completedForm);
}