Examples of XMPPContentHandler


Examples of org.apache.vysper.xml.decoder.XMPPContentHandler

        IoBuffer opening = IoBuffer.wrap("<p:root xmlns:p='http://example.com'>".getBytes("UTF-8"));
        IoBuffer buffer = IoBuffer.wrap(SINGLE_LEVEL_XML.getBytes("UTF-8"));

        DefaultNonBlockingXMLReader reader = new DefaultNonBlockingXMLReader();
        CounterStanzaListener listener = new CounterStanzaListener();
        XMPPContentHandler contentHandler = new XMPPContentHandler();
        contentHandler.setListener(listener);
        reader.setContentHandler(contentHandler);

        StopWatch watch = new StopWatch();

        reader.parse(opening, CharsetUtil.UTF8_DECODER);
View Full Code Here

Examples of org.apache.vysper.xml.decoder.XMPPContentHandler

        }
    }

    public void test() throws Exception {
        NonBlockingXMLReader reader = new DefaultNonBlockingXMLReader();
        XMPPContentHandler handler = new XMPPContentHandler();
        TestListener listener = new TestListener();
        handler.setListener(listener);

        reader.setContentHandler(handler);

        parse(reader, "<stanza:stanza xmlns:stanza='http://etherx.jabber.org/streams'>");
        parse(reader, "<message></message>");
View Full Code Here

Examples of org.apache.vysper.xml.decoder.XMPPContentHandler

        IoBuffer opening = IoBuffer.wrap("<p:root xmlns:p='http://example.com'>".getBytes("UTF-8"));
        IoBuffer buffer = IoBuffer.wrap(SINGLE_LEVEL_XML.getBytes("UTF-8"));

        DefaultNonBlockingXMLReader reader = new DefaultNonBlockingXMLReader();
        CounterStanzaListener listener = new CounterStanzaListener();
        XMPPContentHandler contentHandler = new XMPPContentHandler();
        contentHandler.setListener(listener);
        reader.setContentHandler(contentHandler);

        StopWatch watch = new StopWatch();

        reader.parse(opening, CharsetUtil.UTF8_DECODER);
View Full Code Here

Examples of org.apache.vysper.xml.decoder.XMPPContentHandler

    private Outbound outbound;
    private NonBlockingXMLReader xmlReader = new DefaultNonBlockingXMLReader();
   
    public WebSocketBackedSessionContext(ServerRuntimeContext serverRuntimeContext) {
        super(serverRuntimeContext, new SessionStateHolder());
        XMPPContentHandler contentHandler = new XMPPContentHandler(new StanzaBuilderFactory());
        contentHandler.setListener(this);
       
        try {
            // we need to check the jabber:client/jabber:server NS declarations
            xmlReader.setFeature(DefaultNonBlockingXMLReader.FEATURE_NAMESPACE_PREFIXES, true);
            // allow parser to restart XML stream
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.