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

项目:Smack    文件:Workgroup.java   
/**
 * Asks the workgroup for it's Properties
 *
 * @return the WorkgroupProperties for the specified workgroup.
 * @throws XMPPErrorException
 * @throws NoResponseException
 * @throws NotConnectedException 
 */
public WorkgroupProperties getWorkgroupProperties() throws NoResponseException, XMPPErrorException, NotConnectedException  {
    WorkgroupProperties request = new WorkgroupProperties();
    request.setType(IQ.Type.get);
    request.setTo(workgroupJID);

    WorkgroupProperties response = (WorkgroupProperties) connection.createPacketCollectorAndSend(
                    request).nextResultOrThrow();
    return response;
}
项目:Smack    文件:Workgroup.java   
/**
 * Asks the workgroup for it's Properties
 *
 * @param jid the jid of the user who's information you would like the workgroup to retreive.
 * @return the WorkgroupProperties for the specified workgroup.
 * @throws XMPPErrorException
 * @throws NoResponseException
 * @throws NotConnectedException 
 */
public WorkgroupProperties getWorkgroupProperties(String jid) throws NoResponseException, XMPPErrorException, NotConnectedException {
    WorkgroupProperties request = new WorkgroupProperties();
    request.setJid(jid);
    request.setType(IQ.Type.get);
    request.setTo(workgroupJID);

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