Package org.apache.james.mailbox.exception

Examples of org.apache.james.mailbox.exception.MailboxException


            uid++;
            node.setProperty(JCRMailbox.LASTUID_PROPERTY, uid);
            s.save();
            return uid;
        } catch (RepositoryException e) {
            throw new MailboxException("Unable to consume next uid for mailbox " + mailbox, e);
        }
    }
View Full Code Here


            AtomicValue<Long> value = null;
            try {
                uid.increment();
                value = uid.get();
            } catch (Exception e) {
                throw new MailboxException("Exception incrementing UID for session " + session, e);
            } finally {
                if (value != null && value.succeeded()) {
                    return value.postValue();
                } else {
                    throw new MailboxException("Failed getting next UID for " + session);
                }
            }
        }
        throw new MailboxException("Curator client is closed.");
    }
View Full Code Here

            DistributedAtomicLong uid = new DistributedAtomicLong(client, pathForMailbox(mailbox), retryPolicy);
            AtomicValue<Long> value = null;
            try {
                value = uid.get();
            } catch (Exception e) {
                throw new MailboxException("Exception getting last UID for session " + session, e);
            } finally {
                if (value != null && value.succeeded()) {
                    return value.postValue();
                } else {
                    throw new MailboxException("Failed getting last UID for " + session);
                }
            }
        }
        throw new MailboxException("Curator client is closed.");
    }
View Full Code Here

        try {
            if (getSession().hasPendingChanges()) {
                getSession().save();
            }
        } catch (RepositoryException e) {
            throw new MailboxException("Unable to commit", e);
        }
    }
View Full Code Here

                    count++;
                }
            }
            return count;
        } catch (RepositoryException e) {
            throw new MailboxException("Unable to count messages in mailbox " + mailbox, e);
        }

    }
View Full Code Here

                    count++;
                }
            }
            return count;
        } catch (RepositoryException e) {
            throw new MailboxException("Unable to count unseen messages in mailbox " + mailbox, e);
        }
    }
View Full Code Here

        if (membership.isPersistent()) {
            try {

                getSession().getNodeByIdentifier(membership.getId()).remove();
            } catch (RepositoryException e) {
                throw new MailboxException("Unable to delete message " + message + " in mailbox " + mailbox, e);
            }
        }
    }
View Full Code Here

                results = findMessagesInMailboxBetweenUIDs(mailbox, from, to, max);
                break;
            }
            return results.iterator();
        } catch (RepositoryException e) {
            throw new MailboxException("Unable to search MessageRange " + set + " in mailbox " + mailbox, e);
        }
    }
View Full Code Here

                list.add(new JCRMessage(iterator.nextNode(), mailboxSession.getLog()).getUid());
            }
            return list;

        } catch (RepositoryException e) {
            throw new MailboxException("Unable to search recent messages in mailbox " + mailbox, e);
        }
    }
View Full Code Here

                return new JCRMessage(iterator.nextNode(), mailboxSession.getLog()).getUid();
            } else {
                return null;
            }
        } catch (RepositoryException e) {
            throw new MailboxException("Unable to find first unseen message in mailbox " + mailbox, e);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.james.mailbox.exception.MailboxException

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.