Package rocks.xmpp.extensions.compress.model

Examples of rocks.xmpp.extensions.compress.model.Compress


    public Status processNegotiation(Object element) throws Exception {
        Status status = Status.INCOMPLETE;
        try {
            if (element instanceof Compression) {
                if (method != null) {
                    xmppSession.send(new Compress(method));
                    status = Status.INCOMPLETE;
                } else {
                    status = Status.IGNORE;
                }
            } else if (element instanceof Compressed) {
View Full Code Here


        Assert.assertEquals(compression.getMethods().get(0), CompressionMethod.ZLIB);
    }

    @Test
    public void marshalCompress() throws JAXBException, XMLStreamException {
        Compress compress = new Compress(CompressionMethod.ZLIB);
        String xml = marshal(compress);
        Assert.assertEquals(xml, "<compress xmlns=\"http://jabber.org/protocol/compress\"><method>zlib</method></compress>");
    }
View Full Code Here

TOP

Related Classes of rocks.xmpp.extensions.compress.model.Compress

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.