Package org.apache.vysper.xmpp.delivery.failure

Examples of org.apache.vysper.xmpp.delivery.failure.DeliveryException


            RelayResult relayResult = new RelayResult();

            for (SessionContext sessionContext : receivingSessions) {
                if (sessionContext.getState() != SessionState.AUTHENTICATED) {
                    relayResult.addProcessingError(new DeliveryException("no relay to non-authenticated sessions"));
                    continue;
                }
                try {
                    StanzaHandler stanzaHandler = sessionContext.getServerRuntimeContext().getHandler(stanza);
                    INBOUND_STANZA_PROTOCOL_WORKER.processStanza(sessionContext, sessionStateHolder, stanza,
                            stanzaHandler);
                } catch (Exception e) {
                    relayResult.addProcessingError(new DeliveryException(e));
                }
            }

            return relayResult; // return success result
        }
View Full Code Here


        Assert.assertNotNull(relayResult.getProcessingErrors());
        Assert.assertEquals(0, relayResult.getProcessingErrors().size());
    }

    public void testCstrDeliveryException() {
        RelayResult relayResult = new RelayResult(new DeliveryException());
        Assert.assertTrue(relayResult.hasProcessingErrors());
        Assert.assertEquals(1, relayResult.getProcessingErrors().size());
    }
View Full Code Here

        Assert.assertTrue(relayResult.hasProcessingErrors());
        Assert.assertEquals(1, relayResult.getProcessingErrors().size());
    }

    public void testAddProcessingError() {
        RelayResult relayResult = new RelayResult(new DeliveryException());
        relayResult.addProcessingError(new DeliveryException());
       
        Assert.assertTrue(relayResult.hasProcessingErrors());
        Assert.assertEquals(2, relayResult.getProcessingErrors().size());
    }
View Full Code Here

TOP

Related Classes of org.apache.vysper.xmpp.delivery.failure.DeliveryException

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.