Search in sources :

Example 1 with WorkgroupForm

use of org.jivesoftware.smackx.workgroup.ext.forms.WorkgroupForm in project Smack by igniterealtime.

the class Workgroup method getWorkgroupForm.

/**
     * Returns the Form to use for all clients of a workgroup. It is unlikely that the server
     * will change the form (without a restart) so it is safe to keep the returned form
     * for future submissions.
     *
     * @return the Form to use for searching transcripts.
     * @throws XMPPErrorException
     * @throws NoResponseException
     * @throws NotConnectedException 
     * @throws InterruptedException 
     */
public Form getWorkgroupForm() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
    WorkgroupForm workgroupForm = new WorkgroupForm();
    workgroupForm.setType(IQ.Type.get);
    workgroupForm.setTo(workgroupJID);
    WorkgroupForm response = (WorkgroupForm) connection.createStanzaCollectorAndSend(workgroupForm).nextResultOrThrow();
    return Form.getFormFrom(response);
}
Also used : WorkgroupForm(org.jivesoftware.smackx.workgroup.ext.forms.WorkgroupForm)

Aggregations

WorkgroupForm (org.jivesoftware.smackx.workgroup.ext.forms.WorkgroupForm)1