Examples of establishSession()


Examples of org.jivesoftware.smackx.bytestreams.ibb.InBandBytestreamManager.establishSession()

        };
        targetByteStreamManager.addIncomingBytestreamListener(incomingByteStreamListener);

        InBandBytestreamManager initiatorByteStreamManager = InBandBytestreamManager.getByteStreamManager(initiatorConnection);

        OutputStream outputStream = initiatorByteStreamManager.establishSession(
                        targetConnection.getUser()).getOutputStream();

        // verify stream
        outputStream.write(data);
        outputStream.flush();
View Full Code Here

Examples of org.jivesoftware.smackx.bytestreams.ibb.InBandBytestreamManager.establishSession()

                            XMPPError.Condition.feature_not_implemented);
            IQ errorIQ = IBBPacketUtils.createErrorIQ(targetJID, initiatorJID, xmppError);
            protocol.addResponse(errorIQ);

            // start In-Band Bytestream
            byteStreamManager.establishSession(targetJID);

            fail("exception should be thrown");
        }
        catch (XMPPException e) {
            assertEquals(XMPPError.Condition.feature_not_implemented.toString(),
View Full Code Here

Examples of org.jivesoftware.smackx.bytestreams.ibb.InBandBytestreamManager.establishSession()

        });

        try {
            // start In-Band Bytestream
            byteStreamManager.establishSession(targetJID);
        }
        catch (XMPPException e) {
            protocol.verifyAll();
        }
View Full Code Here

Examples of org.jivesoftware.smackx.bytestreams.ibb.InBandBytestreamManager.establishSession()

        IQ success = IBBPacketUtils.createResultIQ(targetJID, initiatorJID);
        protocol.addResponse(success, Verification.correspondingSenderReceiver,
                        Verification.requestTypeSET);

        // start In-Band Bytestream
        InBandBytestreamSession session = byteStreamManager.establishSession(targetJID);

        assertNotNull(session);
        assertNotNull(session.getInputStream());
        assertNotNull(session.getOutputStream());
View Full Code Here

Examples of org.jivesoftware.smackx.bytestreams.ibb.InBandBytestreamManager.establishSession()

        targetByteStreamManager.addIncomingBytestreamListener(incomingByteStreamListener);

        InBandBytestreamManager initiatorByteStreamManager = InBandBytestreamManager.getByteStreamManager(initiatorConnection);
        initiatorByteStreamManager.setStanza(StanzaType.MESSAGE);

        OutputStream outputStream = initiatorByteStreamManager.establishSession(
                        targetConnection.getUser()).getOutputStream();

        // verify stream
        outputStream.write(data);
        outputStream.flush();
View Full Code Here

Examples of org.jivesoftware.smackx.bytestreams.ibb.InBandBytestreamManager.establishSession()

        };
        targetByteStreamManager.addIncomingBytestreamListener(incomingByteStreamListener);

        InBandBytestreamManager initiatorByteStreamManager = InBandBytestreamManager.getByteStreamManager(initiatorConnection);

        InBandBytestreamSession session = initiatorByteStreamManager.establishSession(targetConnection.getUser());

        // verify stream
        byte[] receivedData = new byte[dataSize];
        InputStream inputStream = session.getInputStream();
        int totalRead = 0;
View Full Code Here

Examples of org.jivesoftware.smackx.bytestreams.socks5.Socks5BytestreamManager.establishSession()

            // build empty discover info as reply if targets features are queried
            DiscoverInfo discoverInfo = new DiscoverInfo();
            protocol.addResponse(discoverInfo);

            // start SOCKS5 Bytestream
            byteStreamManager.establishSession(targetJID);

            fail("exception should be thrown");
        }
        catch (XMPPException e) {
            assertTrue(e.getMessage().contains("doesn't support SOCKS5 Bytestream"));
View Full Code Here

Examples of org.jivesoftware.smackx.bytestreams.socks5.Socks5BytestreamManager.establishSession()

                        Verification.requestTypeGET);

        try {

            // start SOCKS5 Bytestream
            byteStreamManager.establishSession(targetJID, sessionID);

            fail("exception should be thrown");
        }
        catch (XMPPException e) {
            protocol.verifyAll();
View Full Code Here

Examples of org.jivesoftware.smackx.bytestreams.socks5.Socks5BytestreamManager.establishSession()

                        Verification.requestTypeGET);

        try {

            // start SOCKS5 Bytestream
            byteStreamManager.establishSession(targetJID, sessionID);

            fail("exception should be thrown");
        }
        catch (XMPPException e) {
            protocol.verifyAll();
View Full Code Here

Examples of org.jivesoftware.smackx.bytestreams.socks5.Socks5BytestreamManager.establishSession()

                        Verification.requestTypeGET);

        try {

            // start SOCKS5 Bytestream
            byteStreamManager.establishSession(targetJID, sessionID);

            fail("exception should be thrown");
        }
        catch (XMPPException e) {
            protocol.verifyAll();
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.