gnu.mail.providers.nntp
Class NNTPFolder
public final
class
NNTPFolder
extends Folder
A JavaMail folder delegate for an NNTP newsgroup.
Version: 2.0
Author: Chris Burdess
Method Summary |
void | appendMessages(Message[] messages)
NNTP servers are read-only. |
void | close(boolean expunge)
This method has no particular meaning in NNTP. |
boolean | create(int type)
NNTP servers are read-only. |
boolean | delete(boolean recurse)
NNTP servers are read-only. |
boolean | exists()
Indicates whether the newsgroup is present on the server. |
Message[] | expunge()
NNTP servers are read-only. |
void | fetch(Message[] msgs, FetchProfile fp)
Prefetch. |
Folder | getFolder(String name)
This folder type does not contain other folders. |
String | getFullName() |
Message | getMessage(int msgnum)
Returns the article corresponding to the specified article
number. |
int | getMessageCount()
Returns the number of articles in this newsgroup. |
Message[] | getMessages()
Returns all articles in this group.
|
int | getMode()
This folder type is always read-only. |
String | getName()
Returns the name of the newsgroup, e.g. |
Folder | getParent()
This implementation uses a flat namespace, so the parent of any
NNTPFolder is the NNTP root folder. |
Flags | getPermanentFlags()
Returns the flags supported by this folder. |
char | getSeparator()
If we move away from a flat namespace, this might be useful. |
int | getType()
Returns the type of this folder.
|
boolean | hasNewMessages()
Indicates whether there are new articles in this newsgroup. |
boolean | isOpen() |
boolean | isSubscribed()
Indicates if the newsgroup is subscribed.
|
Folder[] | list(String pattern)
This folder type does not contain other folders. |
Folder[] | listSubscribed(String pattern)
This folder type does not contain other folders. |
void | open(int mode)
This method has no particular meaning in NNTP.
|
boolean | renameTo(Folder folder)
NNTP servers are read-only. |
void | setSubscribed(boolean flag)
Subscribes or unsubscribes to this newsgroup.
|
public void appendMessages(
Message[] messages)
NNTP servers are read-only.
public void close(boolean expunge)
This method has no particular meaning in NNTP.
public boolean create(int type)
NNTP servers are read-only.
public boolean delete(boolean recurse)
NNTP servers are read-only.
public boolean exists()
Indicates whether the newsgroup is present on the server.
NNTP servers are read-only.
Prefetch.
public
Folder getFolder(String name)
This folder type does not contain other folders.
public String getFullName()
public
Message getMessage(int msgnum)
Returns the article corresponding to the specified article
number.
Throws: MessageRemovedException often ;-)
public int getMessageCount()
Returns the number of articles in this newsgroup.
Returns all articles in this group.
This tries XHDR first to retrieve Message-IDs for the articles.
If this fails we fall back to statting each article.
public int getMode()
This folder type is always read-only.
public String getName()
Returns the name of the newsgroup, e.g. alt.test
.
This implementation uses a flat namespace, so the parent of any
NNTPFolder is the NNTP root folder.
public
Flags getPermanentFlags()
Returns the flags supported by this folder.
public char getSeparator()
If we move away from a flat namespace, this might be useful.
public int getType()
Returns the type of this folder.
This folder type only holds messages.
public boolean hasNewMessages()
Indicates whether there are new articles in this newsgroup.
public boolean isOpen()
public boolean isSubscribed()
Indicates if the newsgroup is subscribed.
This uses the newsrc mechanism associated with this folder's store.
public
Folder[] list(String pattern)
This folder type does not contain other folders.
public
Folder[] listSubscribed(String pattern)
This folder type does not contain other folders.
public void open(int mode)
This method has no particular meaning in NNTP.
However, we will use it to send a GROUP command and refresh our article
stats.
public boolean renameTo(
Folder folder)
NNTP servers are read-only.
public void setSubscribed(boolean flag)
Subscribes or unsubscribes to this newsgroup.
This uses the newsrc mechanism associated with this folder's store.
© Copyright 2003, 2004
The Free Software Foundation, All rights reserved