Examples of Open


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

        // initialize InBandBytestreamManager to get the InitiationListener
        byteStreamManager = InBandBytestreamManager.getByteStreamManager(connection);

        // create a In-Band Bytestream open packet
        initBytestream = new Open(sessionID, blockSize);
        initBytestream.setFrom(initiatorJID);
        initBytestream.setTo(targetJID);

        incrementingSequence = new Verification<Data, IQ>() {
View Full Code Here

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

        // initialize InBandBytestreamManager to get the InitiationListener
        byteStreamManager = InBandBytestreamManager.getByteStreamManager(connection);

        // create a In-Band Bytestream open packet with message stanza
        initBytestream = new Open(sessionID, blockSize, StanzaType.MESSAGE);
        initBytestream.setFrom(initiatorJID);
        initBytestream.setTo(targetJID);

        incrementingSequence = new Verification<Message, IQ>() {
View Full Code Here

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

*/
public class OpenTest {

    @Test(expected = IllegalArgumentException.class)
    public void shouldNotInstantiateWithInvalidArguments1() {
        new Open(null, 1);
    }
View Full Code Here

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

        new Open(null, 1);
    }

    @Test(expected = IllegalArgumentException.class)
    public void shouldNotInstantiateWithInvalidArguments2() {
        new Open("", 1);
    }
View Full Code Here

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

        new Open("", 1);
    }

    @Test(expected = IllegalArgumentException.class)
    public void shouldNotInstantiateWithInvalidArguments3() {
        new Open("sessionID", -1);
    }
View Full Code Here

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

        new Open("sessionID", -1);
    }

    @Test
    public void shouldSetIQStanzaAsDefault() {
        Open open = new Open("sessionID", 4096);
        assertEquals(StanzaType.IQ, open.getStanza());
    }
View Full Code Here

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

        assertEquals(StanzaType.IQ, open.getStanza());
    }

    @Test
    public void shouldUseMessageStanzaIfGiven() {
        Open open = new Open("sessionID", 4096, StanzaType.MESSAGE);
        assertEquals(StanzaType.MESSAGE, open.getStanza());
    }
View Full Code Here

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

        assertEquals(StanzaType.MESSAGE, open.getStanza());
    }

    @Test
    public void shouldBeOfIQTypeSET() {
        Open open = new Open("sessionID", 4096);
        assertEquals(IQ.Type.SET, open.getType());
    }
View Full Code Here

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

        assertEquals(IQ.Type.SET, open.getType());
    }

    @Test
    public void shouldSetAllFieldsCorrectly() {
        Open open = new Open("sessionID", 4096, StanzaType.MESSAGE);
        assertEquals("sessionID", open.getSessionID());
        assertEquals(4096, open.getBlockSize());
        assertEquals(StanzaType.MESSAGE, open.getStanza());
    }
View Full Code Here

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

                .a("block-size", "4096")
                .a("sid", "i781hf64")
                .a("stanza", "iq")
            .asString(outputProperties);

        Open open = new Open("i781hf64", 4096, StanzaType.IQ);
        open.setFrom("romeo@montague.lit/orchard");
        open.setTo("juliet@capulet.lit/balcony");
        open.setPacketID("jn3h8g65");
       
        assertXMLEqual(control, open.toXML());
    }
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.