net.fortuna.mstor.connector.mbox
Class MboxConnector
java.lang.Object
net.fortuna.mstor.connector.AbstractProtocolConnector
net.fortuna.mstor.connector.mbox.MboxConnector
- All Implemented Interfaces:
- ProtocolConnector
public class MboxConnector
- extends AbstractProtocolConnector
An mbox-based protocol handler.
An mbox-based store would be specified with a url name as follows:
mstor:/home/user/mail/
Metadata is enabled by default,
however it may be disabled by specifying the following session property:
mstor.mbox.metadataStrategy = none
- Author:
- Ben
$Id$
Created on 30/07/2007
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KEY_METADATA_STRATEGY
public static final java.lang.String KEY_METADATA_STRATEGY
- See Also:
- Constant Field Values
MboxConnector
public MboxConnector(javax.mail.URLName url,
MStorStore store,
javax.mail.Session session)
- Parameters:
url -
connect
public boolean connect()
throws javax.mail.AuthenticationFailedException,
javax.mail.MessagingException
-
- Returns:
- true if connection succeeded, otherwise false
- Throws:
javax.mail.AuthenticationFailedException - where connection authentication fails
javax.mail.MessagingException - where an error occurs connecting
disconnect
public void disconnect()
throws javax.mail.MessagingException
-
- Throws:
javax.mail.MessagingException - where an error occurs disconnecting
getDefaultFolder
public javax.mail.Folder getDefaultFolder()
throws javax.mail.MessagingException
-
- Returns:
- the default folder for the connector implementation
- Throws:
javax.mail.MessagingException - where an error occurs retrieving the default folder
getFolder
public javax.mail.Folder getFolder(java.lang.String name)
throws javax.mail.MessagingException
-
- Parameters:
name - the name of the folder to retrieve
- Returns:
- the folder with the specified name, or null if such a folder doesn't exist
- Throws:
javax.mail.MessagingException - where an error occurs retrieving the folder
getFolder
public javax.mail.Folder getFolder(javax.mail.URLName url)
throws javax.mail.MessagingException
-
- Parameters:
url - a folder URL
- Returns:
- the folder at the specified URL, or null if such a folder doesn't exist
- Throws:
javax.mail.MessagingException - where an error occurs retrieving the folder
Copyright © 2004-2011 Micronode. All Rights Reserved.