Examples of IgnoreFailureStrategy


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

    protected void relayStanza(Entity receiver, Stanza stanza,
            ServerRuntimeContext serverRuntimeContext) {
        try {
            serverRuntimeContext.getStanzaRelay().relay(
                    receiver, stanza, new IgnoreFailureStrategy());
        } catch (DeliveryException e) {
            logger.warn("presence relaying failed ", e);
        }
    }
View Full Code Here

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

        }

        if (responseStanzaContainer != null && responseStanzaContainer.getResponseStanza() != null) {
            Stanza responseStanza = responseStanzaContainer.getResponseStanza();
            try {
                IgnoreFailureStrategy failureStrategy = new IgnoreFailureStrategy(); // TODO call back MUC module
                serverRuntimeContext.getStanzaRelay().relay(responseStanza.getTo(), responseStanza, failureStrategy);
            } catch (DeliveryException e) {
                throw new RuntimeException(e);
            }
        }
View Full Code Here

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

        }
    }
   
    protected void relayStanza(Entity receiver, Stanza stanza, ServerRuntimeContext serverRuntimeContext) {
        try {
                serverRuntimeContext.getStanzaRelay().relay(receiver, stanza, new IgnoreFailureStrategy());
        } catch (DeliveryException e) {
                logger.warn("presence relaying failed ", e);
        }
    }
View Full Code Here

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

        if(request.getNode() != null) {
            builder.addAttribute("node", request.getNode());
        }

        try {
            serverRuntimeContext.getStanzaRelay().relay(receiver, builder.build(), new IgnoreFailureStrategy());
        } catch (DeliveryException e) {
            // ignore
        }
       
    }
View Full Code Here

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

            return ServerErrorResponses.getInstance().getStanzaError(StanzaErrorCondition.ITEM_NOT_FOUND, stanza, StanzaErrorType.CANCEL, "roster item contact not in roster: " + contactJid, null, null);
        }

        if (unsubscribedStanza != null) {
            try {
                sessionContext.getServerRuntimeContext().getStanzaRelay().relay(contactJid, unsubscribedStanza, new IgnoreFailureStrategy());
            } catch (DeliveryException e) {
                logger.warn("failure sending unsubscribed on roster remove", e);
            }
        }
        if (unsubscribeStanza != null) {
            try {
                sessionContext.getServerRuntimeContext().getStanzaRelay().relay(contactJid, unsubscribeStanza, new IgnoreFailureStrategy());
            } catch (DeliveryException e) {
                logger.warn("failure sending unsubscribe on roster remove", e);
            }
        }
View Full Code Here

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

        resourceRegistry.bindSession(sessionContext);

        Stanza stanza = StanzaBuilder.createMessageStanza(fromEntity, toEntity, "en", "Hello").build();

        try {
            stanzaRelay.relay(toEntity, stanza, new IgnoreFailureStrategy());
            Stanza recordedStanza = sessionContext.getNextRecordedResponse(1000);
            assertNotNull("stanza delivered", recordedStanza);
            assertEquals("Hello", recordedStanza.getSingleInnerElementsNamed("body").getSingleInnerText().getText());
        } catch (DeliveryException e) {
            throw e;
View Full Code Here

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

        assertTrue(noResourceRemains);

        Stanza stanza = StanzaBuilder.createMessageStanza(fromEntity, toEntity, "en", "Hello").build();

        try {
            stanzaRelay.relay(toEntity, stanza, new IgnoreFailureStrategy());
            Stanza recordedStanza = sessionContext.getNextRecordedResponse(1000);
            assertNull("stanza not delivered to unbound", recordedStanza);
        } catch (DeliveryException e) {
            throw e;
        }
View Full Code Here

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

        TestSessionContext sessionContextToEntity_4_prioMinus = createSessionForTo(toEntity, -1); // not receiving, negative

        Stanza stanza = StanzaBuilder.createMessageStanza(fromEntity, toEntity, "en", "Hello").build();

        try {
            stanzaRelay.relay(toEntity, stanza, new IgnoreFailureStrategy());
            Stanza recordedStanza_1 = sessionContextToEntity_1_prio3.getNextRecordedResponse(100);
            assertNotNull("stanza 1 delivered", recordedStanza_1);
            Stanza recordedStanza_2 = sessionContextToEntity_2_prio0.getNextRecordedResponse(100);
            assertNotNull("stanza 2 delivered", recordedStanza_2);
            Stanza recordedStanza_3 = sessionContextToEntity_3_prio3.getNextRecordedResponse(100);
View Full Code Here

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

        TestSessionContext sessionContextToEntity_4_prioMinus = createSessionForTo(toEntity, -1); // not receiving

        Stanza stanza = StanzaBuilder.createMessageStanza(fromEntity, toEntity, "en", "Hello").build();

        try {
            stanzaRelay.relay(toEntity, stanza, new IgnoreFailureStrategy());
            Stanza recordedStanza_1 = sessionContextToEntity_1_prio3.getNextRecordedResponse(100);
            assertNotNull("stanza 1 delivered", recordedStanza_1);
            Stanza recordedStanza_2 = sessionContextToEntity_2_prio0.getNextRecordedResponse(100);
            assertNull("stanza 2 not delivered", recordedStanza_2);
            Stanza recordedStanza_3 = sessionContextToEntity_3_prio3.getNextRecordedResponse(100);
View Full Code Here

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

        resourceRegistry.bindSession(sessionContext);

        Stanza stanza = StanzaBuilder.createMessageStanza(fromEntity, toEntity, "en", "Hello").build();

        try {
            stanzaRelay.relay(toEntity, stanza, new IgnoreFailureStrategy());
            Stanza recordedStanza = sessionContext.getNextRecordedResponse(1000);
            assertNotNull("stanza delivered", recordedStanza);
            assertEquals("Hello", recordedStanza.getSingleInnerElementsNamed("body").getSingleInnerText().getText());
        } catch (DeliveryException e) {
            throw e;
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.