Package gnu.mail.providers.nntp
Class NNTPStore
- java.lang.Object
-
- javax.mail.Service
-
- javax.mail.Store
-
- gnu.mail.providers.nntp.NNTPStore
-
public class NNTPStore extends Store
An NNTP store provider. This uses an NNTPConnection to handle all the protocol-related functionality.- Version:
- 2.0
- Author:
- Chris Burdess
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close the connection.FoldergetDefaultFolder()Returns the folder representing the "root" namespace.FoldergetFolder(java.lang.String name)Returns a folder by name.FoldergetFolder(URLName url)Returns the folder whose name corresponds to thefilepart of the specified URL.protected booleanprotocolConnect(java.lang.String host, int port, java.lang.String username, java.lang.String password)Performs the protocol connection.-
Methods inherited from class javax.mail.Store
addFolderListener, addStoreListener, getPersonalNamespaces, getSharedNamespaces, getUserNamespaces, notifyFolderListeners, notifyFolderRenamedListeners, notifyStoreListeners, removeFolderListener, removeStoreListener
-
Methods inherited from class javax.mail.Service
addConnectionListener, connect, connect, connect, connect, getURLName, isConnected, notifyConnectionListeners, queueEvent, removeConnectionListener, setConnected, setURLName, toString
-
-
-
-
Method Detail
-
protocolConnect
protected boolean protocolConnect(java.lang.String host, int port, java.lang.String username, java.lang.String password) throws MessagingExceptionPerforms the protocol connection.- Overrides:
protocolConnectin classService- Parameters:
host- the name of the host to connect toport- the port to use (-1 for the default port)username- the usernamepassword- the password- Returns:
- true on success, false if authentication failed
- Throws:
AuthenticationFailedException- on authentication failureMessagingException- for non-authentication failures
-
close
public void close() throws MessagingExceptionClose the connection.- Overrides:
closein classService- Throws:
MessagingException
-
getDefaultFolder
public Folder getDefaultFolder() throws MessagingException
Returns the folder representing the "root" namespace. This folder can be used to browse the folder hierarchy.- Specified by:
getDefaultFolderin classStore- Throws:
MessagingException
-
getFolder
public Folder getFolder(java.lang.String name) throws MessagingException
Returns a folder by name.- Specified by:
getFolderin classStore- Parameters:
name- the folder name- Throws:
MessagingException
-
getFolder
public Folder getFolder(URLName url) throws MessagingException
Returns the folder whose name corresponds to thefilepart of the specified URL.- Specified by:
getFolderin classStore- Parameters:
url- a URLName denoting a folder- Throws:
MessagingException
-
-