Package 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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MboxConnector.MetadataStrategy
-
Field Summary
-
Fields inherited from class net.fortuna.mstor.connector.AbstractProtocolConnector
store, url
-
-
Constructor Summary
Constructors Constructor Description MboxConnector(javax.mail.URLName url, MStorStore store, javax.mail.Session session)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
connect()
void
disconnect()
javax.mail.Folder
getDefaultFolder()
javax.mail.Folder
getFolder(String name)
javax.mail.Folder
getFolder(javax.mail.URLName url)
-
-
-
Constructor Detail
-
MboxConnector
public MboxConnector(javax.mail.URLName url, MStorStore store, javax.mail.Session session)
- Parameters:
url
-
-
-
Method Detail
-
connect
public boolean connect()
- Returns:
- true if connection succeeded, otherwise false
-
disconnect
public void disconnect()
-
getDefaultFolder
public javax.mail.Folder getDefaultFolder()
- Returns:
- the default folder for the connector implementation
-
getFolder
public javax.mail.Folder getFolder(String name)
- 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
-
getFolder
public javax.mail.Folder getFolder(javax.mail.URLName url)
- Parameters:
url
- a folder URL- Returns:
- the folder at the specified URL, or null if such a folder doesn't exist
-
-