Examples of InBandBytestreamRequest


Examples of org.jivesoftware.smackx.bytestreams.ibb.InBandBytestreamRequest

    /**
     * Test reject() method.
     */
    @Test
    public void shouldReplyWithErrorIfRequestIsRejected() {
        InBandBytestreamRequest ibbRequest = new InBandBytestreamRequest(
                        byteStreamManager, initBytestream);

        // reject request
        ibbRequest.reject();

        // capture reply to the In-Band Bytestream open request
        ArgumentCaptor<IQ> argument = ArgumentCaptor.forClass(IQ.class);
        verify(connection).sendPacket(argument.capture());

View Full Code Here

Examples of org.jivesoftware.smackx.bytestreams.ibb.InBandBytestreamRequest

     *
     * @throws Exception should not happen
     */
    @Test
    public void shouldReturnSessionIfRequestIsAccepted() throws Exception {
        InBandBytestreamRequest ibbRequest = new InBandBytestreamRequest(
                        byteStreamManager, initBytestream);

        // accept request
        InBandBytestreamSession session = ibbRequest.accept();

        // capture reply to the In-Band Bytestream open request
        ArgumentCaptor<IQ> argument = ArgumentCaptor.forClass(IQ.class);
        verify(connection).sendPacket(argument.capture());

View Full Code Here

Examples of org.jivesoftware.smackx.bytestreams.ibb.InBandBytestreamRequest

        return new String[] { InBandBytestreamManager.NAMESPACE };
    }

    InputStream negotiateIncomingStream(Packet streamInitiation) throws XMPPException {
        // build In-Band Bytestream request
        InBandBytestreamRequest request = new ByteStreamRequest(this.manager,
                        (Open) streamInitiation);

        // always accept the request
        InBandBytestreamSession session = request.accept();
        session.setCloseBothStreamsEnabled(true);
        return session.getInputStream();
    }
View Full Code Here

Examples of org.jivesoftware.smackx.bytestreams.ibb.InBandBytestreamRequest

        return new String[] { InBandBytestreamManager.NAMESPACE };
    }

    InputStream negotiateIncomingStream(Packet streamInitiation) throws XMPPException {
        // build In-Band Bytestream request
        InBandBytestreamRequest request = new ByteStreamRequest(this.manager,
                        (Open) streamInitiation);

        // always accept the request
        InBandBytestreamSession session = request.accept();
        session.setCloseBothStreamsEnabled(true);
        return session.getInputStream();
    }
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.