Examples of ChatMetadata


Examples of org.jivesoftware.smackx.workgroup.ext.history.ChatMetadata

     * @param sessionID the sessionID to query for.
     * @return Map a map of all metadata associated with the sessionID.
     * @throws XMPPException if an error occurs while getting information from the server.
     */
    public Map getChatMetadata(String sessionID) throws XMPPException {
        ChatMetadata request = new ChatMetadata();
        request.setType(IQ.Type.GET);
        request.setTo(workgroupJID);
        request.setSessionID(sessionID);

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


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

Examples of org.jivesoftware.smackx.workgroup.ext.history.ChatMetadata

     * @param sessionID the sessionID to query for.
     * @return Map a map of all metadata associated with the sessionID.
     * @throws XMPPException if an error occurs while getting information from the server.
     */
    public Map getChatMetadata(String sessionID) throws XMPPException {
        ChatMetadata request = new ChatMetadata();
        request.setType(IQ.Type.GET);
        request.setTo(workgroupJID);
        request.setSessionID(sessionID);

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


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

Examples of org.jivesoftware.smackx.workgroup.ext.history.ChatMetadata

     * @param sessionID the sessionID to query for.
     * @return Map a map of all metadata associated with the sessionID.
     * @throws XMPPException if an error occurs while getting information from the server.
     */
    public Map<String, List<String>> getChatMetadata(String sessionID) throws XMPPException {
        ChatMetadata request = new ChatMetadata();
        request.setType(IQ.Type.GET);
        request.setTo(workgroupJID);
        request.setSessionID(sessionID);

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


        ChatMetadata response = (ChatMetadata)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.getMetadata();
    }
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.