gnu.mail.providers.nntp

Class NNTPStore


public class NNTPStore
extends Store

An NNTP store provider. This uses an NNTPConnection to handle all the protocol-related functionality.

Field Summary

Fields inherited from class javax.mail.Service

debug, session, url

Constructor Summary

NNTPStore(Session session, URLName url)
Constructor.

Method Summary

void
close()
Close the connection.
Folder
getDefaultFolder()
Returns the folder representing the "root" namespace.
Folder
getFolder(String name)
Returns a folder by name.
Folder
getFolder(URLName url)
Returns the folder whose name corresponds to the file part of the specified URL.
protected boolean
protocolConnect(String host, int port, String username, String password)
Performs the protocol connection.

Methods inherited from class javax.mail.Store

addFolderListener, addStoreListener, getDefaultFolder, getFolder, getFolder, getPersonalNamespaces, getSharedNamespaces, getUserNamespaces, notifyFolderListeners, notifyFolderRenamedListeners, notifyStoreListeners, removeFolderListener, removeStoreListener

Methods inherited from class javax.mail.Service

addConnectionListener, close, connect, connect, connect, getURLName, isConnected, notifyConnectionListeners, protocolConnect, removeConnectionListener, setConnected, setURLName, toString

Constructor Details

NNTPStore

public NNTPStore(Session session,
                 URLName url)
Constructor.

Parameters:
session - the session
url - the connection URL

Method Details

close

public void close()
            throws MessagingException
Close the connection.
Overrides:
close in interface Service


getDefaultFolder

public Folder getDefaultFolder()
            throws MessagingException
Returns the folder representing the "root" namespace. This folder can be used to browse the folder hierarchy.
Overrides:
getDefaultFolder in interface Store


getFolder

public Folder getFolder(String name)
            throws MessagingException
Returns a folder by name.
Overrides:
getFolder in interface Store


getFolder

public Folder getFolder(URLName url)
            throws MessagingException
Returns the folder whose name corresponds to the file part of the specified URL.
Overrides:
getFolder in interface Store


protocolConnect

protected boolean protocolConnect(String host,
                                  int port,
                                  String username,
                                  String password)
            throws MessagingException
Performs the protocol connection.
Overrides:
protocolConnect in interface Service