Package net.fortuna.mstor.connector
Interface ProtocolConnector
-
- All Known Implementing Classes:
AbstractProtocolConnector
,JcrConnector
,MboxConnector
,NntpConnector
public interface ProtocolConnector
Implementors provide protocol-specific storage support.
-
-
Method Summary
All Methods Instance Methods Abstract 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)
-
-
-
Method Detail
-
connect
boolean connect() throws javax.mail.AuthenticationFailedException, javax.mail.MessagingException
- Returns:
- true if connection succeeded, otherwise false
- Throws:
javax.mail.AuthenticationFailedException
- where connection authentication failsjavax.mail.MessagingException
- where an error occurs connecting
-
disconnect
void disconnect() throws javax.mail.MessagingException
- Throws:
javax.mail.MessagingException
- where an error occurs disconnecting
-
getDefaultFolder
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
javax.mail.Folder getFolder(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
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
-
-