Examples of DeliveryException


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

            }

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

            }
            return relayResult;
View Full Code Here

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

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

        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

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

        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

Examples of org.masukomi.aspirin.core.delivery.DeliveryException

             * email later.
             */
      if( targetServers == null || targetServers.size() == 0 )
            {
                AspirinInternal.getLogger().warn("ResolveHost.handle(): No mail server found for: '{}'.",new Object[]{host});
                throw new DeliveryException("No MX record found. Temporary failure, trying again.", false);
            }
             AspirinInternal.getLogger().trace("ResolveHost.handle(): {} servers found for '{}'.",new Object[]{targetServers.size(),host});
             dCtx.addContextVariable("targetservers", targetServers);
    } catch( DeliveryException de ) {
      throw de;
    } catch (Exception e) {
      AspirinInternal.getLogger().error("ResolveHost.handle(): Could not get MX for host '"+host+"' defined by recipient '"+currentRecipient+"'.",e);
      throw new DeliveryException("No MX record found. Temporary failure, trying again.", false);
    }

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