Examples of IgnoreFailureStrategy


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

        }

        if (responseStanzaContainer != null && responseStanzaContainer.getResponseStanza() != null) {
            Stanza responseStanza = responseStanzaContainer.getResponseStanza();
            try {
                IgnoreFailureStrategy failureStrategy = new IgnoreFailureStrategy(); // TODO call back 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

        }

        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

            throw new RuntimeException(e);
        }

        // relay the stanza to the contact (via the contact's server)
        try {
            stanzaRelay.relay(stanza.getTo(), stanza, new IgnoreFailureStrategy());
        } catch (DeliveryException e) {
            e.printStackTrace();
        }

        // send roster push to all of the user's interested resources
View Full Code Here

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

            if (!isFromContact || !IsTOAvailable)
                dpMap.add(to);
        }

        try {
            serverRuntimeContext.getStanzaRelay().relay(to, redirectDirectedStanza, new IgnoreFailureStrategy());
        } catch (DeliveryException e) {
            logger.warn("relaying directed presence failed. from = " + from + ", to = " + to);
        }

        return null;
View Full Code Here

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

    }

    protected void relayStanza(Entity receiver, Stanza stanza, SessionContext sessionContext) {
        try {
            sessionContext.getServerRuntimeContext().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

                .build();
    }

    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
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.