Package mireka.transmission

Examples of mireka.transmission.LocalMailSystemException


    public synchronized MaildropAppender allocateAppender()
            throws LocalMailSystemException {
        try {
            initialize();
        } catch (MaildropException e) {
            throw new LocalMailSystemException(e,
                    EnhancedStatus.TRANSIENT_LOCAL_ERROR_IN_PROCESSING);
        }
        appenderCount++;
        return new Appender();
    }
View Full Code Here


                throw new IllegalStateException();
            synchronized (Maildrop.this) {
                try {
                    allocateFileNames();
                } catch (InvalidUidFileException e) {
                    throw new LocalMailSystemException(e,
                            EnhancedStatus.TRANSIENT_LOCAL_ERROR_IN_PROCESSING);
                }
            }
            try {
                outputStream = new FileOutputStream(tempFile);
            } catch (FileNotFoundException e) {
                throw new LocalMailSystemException(e,
                        EnhancedStatus.TRANSIENT_LOCAL_ERROR_IN_PROCESSING);
            }
            status = AppenderStatus.OPEN;
            return outputStream;
        }
View Full Code Here

                // status is OPEN
                try {
                    outputStream.close();
                } catch (IOException e) {
                    throw new LocalMailSystemException(e,
                            EnhancedStatus.TRANSIENT_LOCAL_ERROR_IN_PROCESSING);
                }
                Message message = new Message();
                message.id = uid;
                message.length = tempFile.length();
                if (message.length == 0)
                    throw new LocalMailSystemException(
                            "Cannot retrieve file length " + tempFile,
                            EnhancedStatus.TRANSIENT_LOCAL_ERROR_IN_PROCESSING);
                boolean success = tempFile.renameTo(finalFile);
                if (!success) {
                    if (tempFile.delete()) {
                        throw new LocalMailSystemException(
                                "Cannot move temporary file to final "
                                        + "destination, but at least it could be deleted "
                                        + tempFile,
                                EnhancedStatus.TRANSIENT_LOCAL_ERROR_IN_PROCESSING);
                    } else {
                        throw new LocalMailSystemException(
                                "Cannot move temporary file to final destination, nor it can be deleted "
                                        + tempFile,
                                EnhancedStatus.TRANSIENT_LOCAL_ERROR_IN_PROCESSING);
                    }
                }
View Full Code Here

TOP

Related Classes of mireka.transmission.LocalMailSystemException

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.