Package mireka.transmission.immediate

Examples of mireka.transmission.immediate.SendException


        Record[] records = lookup.run();
        switch (lookup.getResult()) {
        case Lookup.SUCCESSFUL:
            return records;
        case Lookup.TYPE_NOT_FOUND:
            throw new SendException("Host " + name + " has no address record ("
                    + lookup.getErrorString() + ")",
                    EnhancedStatus.PERMANENT_UNABLE_TO_ROUTE, remoteMta);
        case Lookup.HOST_NOT_FOUND:
            throw new SendException("Host " + name + " is not found ("
                    + lookup.getErrorString() + ")",
                    EnhancedStatus.PERMANENT_UNABLE_TO_ROUTE, remoteMta);
        case Lookup.TRY_AGAIN:
            throw new SendException(
                    "DNS network failure while looking up address of " + name
                            + ": " + lookup.getErrorString(),
                    EnhancedStatus.TRANSIENT_DIRECTORY_SERVER_FAILURE,
                    remoteMta);
        case Lookup.UNRECOVERABLE:
            throw new SendException(
                    "Unrecoverable DNS error while looking up address of "
                            + name + ": " + lookup.getErrorString(),
                    EnhancedStatus.PERMANENT_UNABLE_TO_ROUTE, remoteMta);
        default:
            throw new SendException(
                    "Unknown DNS status while looking up address of " + name
                            + ": " + lookup.getResult() + ". "
                            + lookup.getErrorString(),
                    EnhancedStatus.PERMANENT_INTERNAL_ERROR, remoteMta);
        }
View Full Code Here


                lookup.getResult();
                result = Lookup.TRY_AGAIN;
            }
        };

        SendException e;
        try {
            addressLookup.queryAddresses();
            fail("An exception must have been thrown.");
            return;
        } catch (SendException e1) {
            e = e1;
        }

        assertTrue(e.errorStatus().shouldRetry());
    }
View Full Code Here

        } else {
            logger.debug("Too much postponings of delivery attempt. "
                    + "The next would be the " + mail.postpones
                    + ". Attempt is considered to be a failure.");
            SendException sendException =
                    new SendException(
                            "Too much postponings of delivery attempt, attempt is considered to be a failure.",
                            e, e.getEnhancedStatus(), e.getRemoteMta());
            EntireMailFailureHandler failureHandler =
                    new EntireMailFailureHandler(mail, sendException);
            failureHandler.onFailure();
View Full Code Here

            }
        }

        private void fillInRecipientFailureReport(
                RecipientProblemReport report, SendingFailure failure) {
            SendException exception = failure.exception;
            report.recipient = failure.recipient;
            report.status = exception.errorStatus();
            report.remoteMta = exception.remoteMta();
            if (exception instanceof RemoteMtaErrorResponseException)
                report.remoteMtaDiagnosticStatus =
                        ((RemoteMtaErrorResponseException) exception)
                                .remoteMtaStatus();
            report.failureDate = exception.failureDate;
            report.logId = exception.getLogId();
        }
View Full Code Here

TOP

Related Classes of mireka.transmission.immediate.SendException

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.