All Packages This Package Class Hierarchy Class Search Index
Class grendel.storage.NewsStore
java.lang.Object | +----javax.mail.Service | +----javax.mail.Store | +----grendel.storage.NewsStore
Store for News (NNTP) folders.
This class really shouldn't be public, but I haven't figured out how to tie into javamail's Session class properly. So, instead of using Session.getStore(String), you instead need to call NewsStore.GetDefaultStore(Session).
public class NewsStore extends javax.mail.Store { // Fields 4 protected static NewsStore DefaultStore; protected NewsRC newsrc; protected NNTPConnection nntp; protected NewsFolderRoot root_folder; // Constructors 2 public NewsStore(Session); public NewsStore(Session, URLName); // Methods 13 public static Store GetDefaultStore(Session); public void close(); public Folder getDefaultFolder(); String[] getDefaultSubscriptions(); public Folder getFolder(String) throws MessagingException; public Folder getFolder(URL); public Folder getFolder(URLName); int[] getGroupCounts(NewsFolder); InputStream getMessageStream(NewsMessage, boolean) throws NNTPException, IOException; NewsRC getNewsRC(); private void loadNewsRC(String) throws IOException; void openNewsgroup(NewsFolder, long, long); protected boolean protocolConnect(String, String, String) throws MessagingException; }
Fields
• nntp
protected NNTPConnection nntp
• newsrc
protected NewsRC newsrc
• root_folder
protected NewsFolderRoot root_folder
• DefaultStore
protected static NewsStore DefaultStore
Constructors
• NewsStore
public NewsStore(Session s)
• NewsStore
public NewsStore(Session s, URLName u)
Methods
• GetDefaultStore
public static Store GetDefaultStore(Session s)
• getNewsRC
NewsRC getNewsRC()
• loadNewsRC
private void loadNewsRC(String host) throws IOException
• protocolConnect
protected boolean protocolConnect(String host, String user, String password) throws MessagingException
• close
public void close()
• getDefaultFolder
public Folder getDefaultFolder()
- Overrides:
- getDefaultFolder in class Store
• getFolder
public Folder getFolder(String name) throws MessagingException
• getFolder
public Folder getFolder(URL url)
• getFolder
public Folder getFolder(URLName urlName)
• getMessageStream
InputStream getMessageStream(NewsMessage message, boolean headers_too) throws NNTPException, IOException
• getGroupCounts
int[] getGroupCounts(NewsFolder folder)
Returns array of int: [ nmessages low hi ]
• getDefaultSubscriptions
String[] getDefaultSubscriptions()
Returns a list of newsgroups to which new users should be subscribed, if they don't have a newsrc file. Tries to ask the news server for this list; otherwise, uses some builtin defaults.
• openNewsgroup
void openNewsgroup(NewsFolder folder, long from, long to)
All Packages This Package Class Hierarchy Class Search IndexFreshly brewed Java API Documentation automatically generated with polardoc Version 1.0.4