Java 类org.jivesoftware.smackx.workgroup.settings.SearchSettings 实例源码

项目:EIM    文件:AgentSession.java   
/**
 * Asks the workgroup for it's Search Settings.
 *
 * @return SearchSettings the search settings for this workgroup.
 * @throws XMPPException if an error occurs while getting information from the server.
 */
public SearchSettings getSearchSettings() throws XMPPException {
    SearchSettings request = new SearchSettings();
    request.setType(IQ.Type.GET);
    request.setTo(workgroupJID);

    PacketCollector collector = connection.createPacketCollector(new PacketIDFilter(request.getPacketID()));
    connection.sendPacket(request);


    SearchSettings response = (SearchSettings)collector.nextResult(SmackConfiguration.getPacketReplyTimeout());

    // Cancel the collector.
    collector.cancel();
    if (response == null) {
        throw new XMPPException("No response from server.");
    }
    if (response.getError() != null) {
        throw new XMPPException(response.getError());
    }
    return response;
}
项目:androidPN-client.    文件:AgentSession.java   
/**
 * Asks the workgroup for it's Search Settings.
 *
 * @return SearchSettings the search settings for this workgroup.
 * @throws XMPPException if an error occurs while getting information from the server.
 */
public SearchSettings getSearchSettings() throws XMPPException {
    SearchSettings request = new SearchSettings();
    request.setType(IQ.Type.GET);
    request.setTo(workgroupJID);

    PacketCollector collector = connection.createPacketCollector(new PacketIDFilter(request.getPacketID()));
    connection.sendPacket(request);


    SearchSettings response = (SearchSettings)collector.nextResult(SmackConfiguration.getPacketReplyTimeout());

    // Cancel the collector.
    collector.cancel();
    if (response == null) {
        throw new XMPPException("No response from server.");
    }
    if (response.getError() != null) {
        throw new XMPPException(response.getError());
    }
    return response;
}
项目:xmppsupport_v2    文件:AgentSession.java   
/**
 * Asks the workgroup for it's Search Settings.
 * 
 * @return SearchSettings the search settings for this workgroup.
 * @throws XMPPException
 *             if an error occurs while getting information from the server.
 */
public SearchSettings getSearchSettings() throws XMPPException {
    SearchSettings request = new SearchSettings();
    request.setType(IQ.Type.GET);
    request.setTo(workgroupJID);

    PacketCollector collector = connection
            .createPacketCollector(new PacketIDFilter(request.getPacketID()));
    connection.sendPacket(request);

    SearchSettings response = (SearchSettings) collector
            .nextResult(SmackConfiguration.getPacketReplyTimeout());

    // Cancel the collector.
    collector.cancel();
    if (response == null) {
        throw new XMPPException("No response from server.");
    }
    if (response.getError() != null) {
        throw new XMPPException(response.getError());
    }
    return response;
}
项目:java-bells    文件:AgentSession.java   
/**
 * Asks the workgroup for it's Search Settings.
 *
 * @return SearchSettings the search settings for this workgroup.
 * @throws XMPPException if an error occurs while getting information from the server.
 */
public SearchSettings getSearchSettings() throws XMPPException {
    SearchSettings request = new SearchSettings();
    request.setType(IQ.Type.GET);
    request.setTo(workgroupJID);

    PacketCollector collector = connection.createPacketCollector(new PacketIDFilter(request.getPacketID()));
    connection.sendPacket(request);


    SearchSettings response = (SearchSettings)collector.nextResult(SmackConfiguration.getPacketReplyTimeout());

    // Cancel the collector.
    collector.cancel();
    if (response == null) {
        throw new XMPPException("No response from server.");
    }
    if (response.getError() != null) {
        throw new XMPPException(response.getError());
    }
    return response;
}
项目:telegraph    文件:AgentSession.java   
/**
 * Asks the workgroup for it's Search Settings.
 *
 * @return SearchSettings the search settings for this workgroup.
 * @throws XMPPException if an error occurs while getting information from the server.
 */
public SearchSettings getSearchSettings() throws XMPPException {
    SearchSettings request = new SearchSettings();
    request.setType(IQ.Type.GET);
    request.setTo(workgroupJID);

    PacketCollector collector = connection.createPacketCollector(new PacketIDFilter(request.getPacketID()));
    connection.sendPacket(request);


    SearchSettings response = (SearchSettings)collector.nextResult(SmackConfiguration.getPacketReplyTimeout());

    // Cancel the collector.
    collector.cancel();
    if (response == null) {
        throw new XMPPException("No response from server.");
    }
    if (response.getError() != null) {
        throw new XMPPException(response.getError());
    }
    return response;
}
项目:NewCommunication-Android    文件:AgentSession.java   
/**
 * Asks the workgroup for it's Search Settings.
 *
 * @return SearchSettings the search settings for this workgroup.
 * @throws XMPPException if an error occurs while getting information from the server.
 */
public SearchSettings getSearchSettings() throws XMPPException {
    SearchSettings request = new SearchSettings();
    request.setType(IQ.Type.GET);
    request.setTo(workgroupJID);

    PacketCollector collector = connection.createPacketCollector(new PacketIDFilter(request.getPacketID()));
    connection.sendPacket(request);


    SearchSettings response = (SearchSettings)collector.nextResult(SmackConfiguration.getPacketReplyTimeout());

    // Cancel the collector.
    collector.cancel();
    if (response == null) {
        throw new XMPPException("No response from server.");
    }
    if (response.getError() != null) {
        throw new XMPPException(response.getError());
    }
    return response;
}
项目:Smack    文件:AgentSession.java   
/**
 * Asks the workgroup for it's Search Settings.
 *
 * @return SearchSettings the search settings for this workgroup.
 * @throws XMPPErrorException 
 * @throws NoResponseException 
 * @throws NotConnectedException 
 */
public SearchSettings getSearchSettings() throws NoResponseException, XMPPErrorException, NotConnectedException {
    SearchSettings request = new SearchSettings();
    request.setType(IQ.Type.get);
    request.setTo(workgroupJID);

    SearchSettings response = (SearchSettings) connection.createPacketCollectorAndSend(request).nextResultOrThrow();
    return response;
}