Package org.jivesoftware.smackx.bytestreams.ibb.packet

Examples of org.jivesoftware.smackx.bytestreams.ibb.packet.Data


        PacketListener listener = Whitebox.getInternalState(inputStream, PacketListener.class);

        // build data packet
        String base64Data = StringUtils.encodeBase64("Data");
        DataPacketExtension dpe = new DataPacketExtension(sessionID, 0, base64Data);
        Data data = new Data(dpe);

        // add data packets
        listener.processPacket(data);

        inputStream.close();
View Full Code Here


        PacketListener listener = Whitebox.getInternalState(inputStream, PacketListener.class);

        // build data packet
        String base64Data = StringUtils.encodeBase64("Data");
        DataPacketExtension dpe = new DataPacketExtension(sessionID, 0, base64Data);
        Data data = new Data(dpe);

        // add data packets
        listener.processPacket(data);

        session.close();
View Full Code Here

        PacketListener listener = Whitebox.getInternalState(inputStream, PacketListener.class);

        // build data packet
        String base64Data = StringUtils.encodeBase64("Data");
        DataPacketExtension dpe = new DataPacketExtension(sessionID, 0, base64Data);
        Data data = new Data(dpe);

        // add data packets
        listener.processPacket(data);

        Thread closer = new Thread(new Runnable() {
View Full Code Here

    public DataListener(InBandBytestreamManager manager) {
        this.manager = manager;
    }

    public void processPacket(Packet packet) {
        Data data = (Data) packet;
        InBandBytestreamSession ibbSession = this.manager.getSessions().get(
                        data.getDataPacketExtension().getSessionID());
        if (ibbSession == null) {
            this.manager.replyItemNotFoundPacket(data);
        }
    }
View Full Code Here

    private class IQIBBOutputStream extends IBBOutputStream {

        @Override
        protected synchronized void writeToXML(DataPacketExtension data) throws IOException {
            // create IQ stanza containing data packet
            IQ iq = new Data(data);
            iq.setTo(remoteJID);

            try {
                SyncPacketSend.getReply(connection, iq);
            }
            catch (XMPPException e) {
View Full Code Here

        // get the DataListener from InBandByteStreamManager
        DataListener dataListener = Whitebox.getInternalState(byteStreamManager,
                        DataListener.class);

        DataPacketExtension dpe = new DataPacketExtension("unknownSessionID", 0, "Data");
        Data data = new Data(dpe);
        data.setFrom(initiatorJID);
        data.setTo(targetJID);

        dataListener.processPacket(data);

        // wait because packet is processed in an extra thread
        Thread.sleep(200);
View Full Code Here

        return new DataPacketExtension(sessionID, seq, data);
    }

    public IQ parseIQ(XmlPullParser parser) throws Exception {
        DataPacketExtension data = (DataPacketExtension) parseExtension(parser);
        IQ iq = new Data(data);
        return iq;
    }
View Full Code Here

    private class IQIBBOutputStream extends IBBOutputStream {

        @Override
        protected synchronized void writeToXML(DataPacketExtension data) throws IOException {
            // create IQ stanza containing data packet
            IQ iq = new Data(data);
            iq.setTo(remoteJID);

            try {
                SyncPacketSend.getReply(connection, iq);
            }
            catch (XMPPException e) {
View Full Code Here

TOP

Related Classes of org.jivesoftware.smackx.bytestreams.ibb.packet.Data

Copyright © 2018 www.massapicom. 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.