Examples of GenericSettings


Examples of org.jivesoftware.smackx.workgroup.settings.GenericSettings

     * @param query an optional query object used to tell the server what metadata to retrieve. This can be null.
     * @throws XMPPException if an error occurs while sending the request to the server.
     * @return the settings for the workgroup.
     */
    public GenericSettings getGenericSettings(Connection con, String query) throws XMPPException {
        GenericSettings setting = new GenericSettings();
        setting.setType(IQ.Type.GET);
        setting.setTo(workgroupJID);

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

        GenericSettings response = (GenericSettings)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;
    }
View Full Code Here

Examples of org.jivesoftware.smackx.workgroup.settings.GenericSettings

     * @param query an optional query object used to tell the server what metadata to retrieve. This can be null.
     * @throws XMPPException if an error occurs while sending the request to the server.
     * @return the settings for the workgroup.
     */
    public GenericSettings getGenericSettings(XMPPConnection con, String query) throws XMPPException {
        GenericSettings setting = new GenericSettings();
        setting.setType(IQ.Type.GET);
        setting.setTo(workgroupJID);

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

        GenericSettings response = (GenericSettings)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;
    }
View Full Code Here

Examples of org.jivesoftware.smackx.workgroup.settings.GenericSettings

     * @param query an optional query object used to tell the server what metadata to retrieve. This can be null.
     * @throws XMPPException if an error occurs while sending the request to the server.
     * @return the settings for the workgroup.
     */
    public GenericSettings getGenericSettings(Connection con, String query) throws XMPPException {
        GenericSettings setting = new GenericSettings();
        setting.setType(IQ.Type.GET);
        setting.setTo(workgroupJID);

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

        GenericSettings response = (GenericSettings)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;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.